X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Flibcfs%2Fdarwin%2Fdarwin-proc.c;fp=libcfs%2Flibcfs%2Fdarwin%2Fdarwin-proc.c;h=1780f5b7dbe9e553a7ba28cc82f200df8dbf6fce;hb=8c47378b057e72d6125f4baffe8721e0734d0d3f;hp=b1e2e845cc37d9ffb45c3f7b9780de2e7d9659d4;hpb=4dd31baae9a73502c5c7bb5c0962fd703e231fd5;p=fs%2Flustre-release.git diff --git a/libcfs/libcfs/darwin/darwin-proc.c b/libcfs/libcfs/darwin/darwin-proc.c index b1e2e84..1780f5b 100644 --- a/libcfs/libcfs/darwin/darwin-proc.c +++ b/libcfs/libcfs/darwin/darwin-proc.c @@ -54,7 +54,7 @@ static struct libcfs_sysctl_sprite { struct sysctl_oid_list *ss_link; } libcfs_sysctl_sprite = { 0, NULL }; -static cfs_sysctl_table_header_t *libcfs_table_header = NULL; +static struct ctl_table_header *libcfs_table_header = NULL; extern unsigned int libcfs_debug; extern unsigned int libcfs_subsystem_debug; extern unsigned int libcfs_printk; @@ -204,7 +204,7 @@ SYSCTL_PROC(_lnet, OID_AUTO, fail_loc, CTLTYPE_INT | CTLFLAG_RW , &cfs_fail_loc, 0, &proc_fail_loc, "I", "cfs_fail_loc"); -static cfs_sysctl_table_t top_table[] = { +static struct ctl_table top_table[] = { &sysctl__lnet, &sysctl__lnet_debug, &sysctl__lnet_subsystem_debug, @@ -223,28 +223,28 @@ static cfs_sysctl_table_t top_table[] = { /* * Register sysctl table */ -cfs_sysctl_table_header_t * -cfs_register_sysctl_table (cfs_sysctl_table_t *table, int arg) +struct ctl_table_header * +register_sysctl_table(struct ctl_table *table, int arg) { - cfs_sysctl_table_t item; - int i = 0; + struct ctl_table item; + int i = 0; - while ((item = table[i++]) != NULL) - sysctl_register_oid(item); - return table; + while ((item = table[i++]) != NULL) + sysctl_register_oid(item); + return table; } /* * Unregister sysctl table */ -void -cfs_unregister_sysctl_table (cfs_sysctl_table_header_t *table) { - int i = 0; - cfs_sysctl_table_t item; +void unregister_sysctl_table(struct ctl_table_header *table) +{ + int i = 0; + struct ctl_table item; - while ((item = table[i++]) != NULL) - sysctl_unregister_oid(item); - return; + while ((item = table[i++]) != NULL) + sysctl_unregister_oid(item); + return; } /* @@ -413,8 +413,8 @@ int insert_proc(void) { #if 1 - if (!libcfs_table_header) - libcfs_table_header = cfs_register_sysctl_table(top_table, 0); + if (!libcfs_table_header) + libcfs_table_header = register_sysctl_table(top_table); #endif return 0; } @@ -423,9 +423,9 @@ void remove_proc(void) { #if 1 - if (libcfs_table_header != NULL) - cfs_unregister_sysctl_table(libcfs_table_header); - libcfs_table_header = NULL; + if (libcfs_table_header != NULL) + unregister_sysctl_table(libcfs_table_header); + libcfs_table_header = NULL; #endif return; }