Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_init.c
Show First 20 Lines • Show All 519 Lines • ▼ Show 20 Lines | vfs_register(struct vfsconf *vfc) | ||||
* match the filesystem's type number. This allows user code | * match the filesystem's type number. This allows user code | ||||
* which uses the type number to read sysctl variables defined | * which uses the type number to read sysctl variables defined | ||||
* by the filesystem to continue working. Since the oids are | * by the filesystem to continue working. Since the oids are | ||||
* in a sorted list, we need to make sure the order is | * in a sorted list, we need to make sure the order is | ||||
* preserved by re-registering the oid after modifying its | * preserved by re-registering the oid after modifying its | ||||
* number. | * number. | ||||
*/ | */ | ||||
sysctl_wlock(); | sysctl_wlock(); | ||||
SLIST_FOREACH(oidp, SYSCTL_CHILDREN(&sysctl___vfs), oid_link) { | RB_FOREACH(oidp, sysctl_oid_list, SYSCTL_CHILDREN(&sysctl___vfs)) { | ||||
if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { | if (strcmp(oidp->oid_name, vfc->vfc_name) == 0) { | ||||
sysctl_unregister_oid(oidp); | sysctl_unregister_oid(oidp); | ||||
oidp->oid_number = vfc->vfc_typenum; | oidp->oid_number = vfc->vfc_typenum; | ||||
sysctl_register_oid(oidp); | sysctl_register_oid(oidp); | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
sysctl_wunlock(); | sysctl_wunlock(); | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |