mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-23 16:01:42 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315699
@ -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 New Issue
Block a user