| 315 | } |
| 316 | |
| 317 | static void |
| 318 | linker_file_enable_sysctls(linker_file_t lf) |
| 319 | { |
| 320 | struct sysctl_oid **start, **stop, **oidp; |
| 321 | |
| 322 | KLD_DPF(FILE, |
| 323 | ("linker_file_enable_sysctls: enable SYSCTLs for %s\n", |
| 324 | lf->filename)); |
| 325 | |
| 326 | sx_assert(&kld_sx, SA_XLOCKED); |
| 327 | |
| 328 | if (linker_file_lookup_set(lf, "sysctl_set", &start, &stop, NULL) != 0) |
| 329 | return; |
| 330 | |
| 331 | sx_xunlock(&kld_sx); |
| 332 | sysctl_wlock(); |
| 333 | for (oidp = start; oidp < stop; oidp++) |
| 334 | sysctl_enable_oid(*oidp); |
| 335 | sysctl_wunlock(); |
| 336 | sx_xlock(&kld_sx); |
| 337 | } |
| 338 | |
| 339 | static void |
| 340 | linker_file_unregister_sysctls(linker_file_t lf) |
no test coverage detected