Add a missing argument for SYSCTL_ADD_OPAQUE.
Fix the examples at the end which were horribly broken.
This commit is contained in:
parent
ca5fac557f
commit
47608b56e1
@ -150,6 +150,7 @@
|
||||
.Fa "int access"
|
||||
.Fa "void *arg"
|
||||
.Fa "size_t *len"
|
||||
.Fa "char *format"
|
||||
.Fa "char *descr"
|
||||
.Fc
|
||||
.Ft struct sysctl_oid *
|
||||
@ -463,14 +464,14 @@ char *string = "dynamic sysctl";
|
||||
...
|
||||
|
||||
root1 = SYSCTL_ADD_NODE( NULL, SYSCTL_STATIC_CHILDREN(/* tree top */),
|
||||
OID_AUTO, newtree, CTFLAG_RW, 0, "new top level tree");
|
||||
OID_AUTO, "newtree", CTLFLAG_RW, 0, "new top level tree");
|
||||
oidp = SYSCTL_ADD_INT( NULL, SYSCTL_CHILDREN(root1),
|
||||
OID_AUTO, newint, CTLFLAG_RW, &a_int, 0, "new int leaf");
|
||||
OID_AUTO, "newint", CTLFLAG_RW, &a_int, 0, "new int leaf");
|
||||
...
|
||||
root2 = SYSCTL_ADD_NODE( NULL, SYSCTL_STATIC_CHILDREN(_debug),
|
||||
OID_AUTO, newtree, CTFLAG_RW, 0, "new tree under debug");
|
||||
OID_AUTO, "newtree", CTLFLAG_RW, 0, "new tree under debug");
|
||||
oidp = SYSCTL_ADD_STRING( NULL, SYSCTL_CHILDREN(root2),
|
||||
OID_AUTO, newstring, CTLFLAG_R, string, 0, "new string leaf");
|
||||
OID_AUTO, "newstring", CTLFLAG_RD, string, 0, "new string leaf");
|
||||
.Ed
|
||||
.Pp
|
||||
This example creates the following subtrees:
|
||||
|
Loading…
Reference in New Issue
Block a user