Initialize a new context to keep track of dynamically added sysctls. */
| 586 | |
| 587 | /* Initialize a new context to keep track of dynamically added sysctls. */ |
| 588 | int |
| 589 | sysctl_ctx_init(struct sysctl_ctx_list *c) |
| 590 | { |
| 591 | |
| 592 | if (c == NULL) { |
| 593 | return (EINVAL); |
| 594 | } |
| 595 | |
| 596 | /* |
| 597 | * No locking here, the caller is responsible for not adding |
| 598 | * new nodes to a context until after this function has |
| 599 | * returned. |
| 600 | */ |
| 601 | TAILQ_INIT(c); |
| 602 | return (0); |
| 603 | } |
| 604 | |
| 605 | /* Free the context, and destroy all dynamic oids registered in this context */ |
| 606 | int |
no outgoing calls
no test coverage detected