| 522 | } |
| 523 | |
| 524 | void |
| 525 | sysctl_register_disabled_oid(struct sysctl_oid *oidp) |
| 526 | { |
| 527 | |
| 528 | /* |
| 529 | * Mark the leaf as dormant if it's not to be immediately enabled. |
| 530 | * We do not disable nodes as they can be shared between modules |
| 531 | * and it is always safe to access a node. |
| 532 | */ |
| 533 | KASSERT((oidp->oid_kind & CTLFLAG_DORMANT) == 0, |
| 534 | ("internal flag is set in oid_kind")); |
| 535 | if ((oidp->oid_kind & CTLTYPE) != CTLTYPE_NODE) |
| 536 | oidp->oid_kind |= CTLFLAG_DORMANT; |
| 537 | sysctl_register_oid(oidp); |
| 538 | } |
| 539 | |
| 540 | void |
| 541 | sysctl_enable_oid(struct sysctl_oid *oidp) |
no test coverage detected