MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sysctl_remove_name

Function sysctl_remove_name

freebsd/kern/kern_sysctl.c:730–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730int
731sysctl_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
750static int
751sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse)

Callers

nothing calls this directly

Calls 2

strcmpFunction · 0.85
sysctl_remove_oid_lockedFunction · 0.85

Tested by

no test coverage detected