| 728 | } |
| 729 | |
| 730 | int |
| 731 | sysctl_remove_name(struct sysctl_oid *parent, const char *name, |
| 732 | int del, int recurse) |
| 733 | { |
| 734 | struct sysctl_oid *p, *tmp; |
| 735 | int error; |
| 736 | |
| 737 | error = ENOENT; |
| 738 | SYSCTL_WLOCK(); |
| 739 | SLIST_FOREACH_SAFE(p, SYSCTL_CHILDREN(parent), oid_link, tmp) { |
| 740 | if (strcmp(p->oid_name, name) == 0) { |
| 741 | error = sysctl_remove_oid_locked(p, del, recurse); |
| 742 | break; |
| 743 | } |
| 744 | } |
| 745 | SYSCTL_WUNLOCK(); |
| 746 | |
| 747 | return (error); |
| 748 | } |
| 749 | |
| 750 | static int |
| 751 | sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse) |
nothing calls this directly
no test coverage detected