summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sysctl.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-01-05 07:00:45 +0000
committerjhb <jhb@FreeBSD.org>2001-01-05 07:00:45 +0000
commitc89c5ac184c8121ba8c76a673fa9099c1540dcdf (patch)
tree4b0558e2b6fe45e6228e04fc2007881ac7c6e426 /sys/kern/kern_sysctl.c
parent1f45c7f8de614b14e53b43eb44d9cefb822c3868 (diff)
downloadFreeBSD-src-c89c5ac184c8121ba8c76a673fa9099c1540dcdf.zip
FreeBSD-src-c89c5ac184c8121ba8c76a673fa9099c1540dcdf.tar.gz
- For dynamic sysctl's added at runtime, don't assume that the name passed
to the SYSCTL_ADD_FOO() macros is a constant that should be turned into a string via the pre-processor. Instead, require it to be an explicit string so that names can be generated on the fly. - Make some of the char * arguments to sysctl_add_oid() const to quiet warnings.
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r--sys/kern/kern_sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index e9aeff5..e9e9cd8 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -315,8 +315,8 @@ sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse)
*/
struct sysctl_oid *
sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
- int number, char *name, int kind, void *arg1, int arg2,
- int (*handler)(SYSCTL_HANDLER_ARGS), char *fmt, char *descr)
+ int number, const char *name, int kind, void *arg1, int arg2,
+ int (*handler)(SYSCTL_HANDLER_ARGS), const char *fmt, const char *descr)
{
struct sysctl_oid *oidp;
ssize_t len;
OpenPOWER on IntegriCloud