mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Print out name of non-dynamic sysctl in sysctl_remove_oid_locked
This will provide a slightly better smoking gun than just stating
"can't remove non-dynamic nodes!" when calling sysctl_ctx_free(9)
and sysctl_remove_{name,oid}(9) with a non-dynamic (likely
static) sysctl.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
25e76a1d57
commit
8b69c3e79f
1 changed files with 2 additions and 1 deletions
|
|
@ -628,7 +628,8 @@ sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse)
|
|||
if (oidp == NULL)
|
||||
return(EINVAL);
|
||||
if ((oidp->oid_kind & CTLFLAG_DYN) == 0) {
|
||||
printf("can't remove non-dynamic nodes!\n");
|
||||
printf("Warning: can't remove non-dynamic nodes (%s)!\n",
|
||||
oidp->oid_name);
|
||||
return (EINVAL);
|
||||
}
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue