summaryrefslogtreecommitdiffstats
path: root/sys/net/vnet.h
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2011-01-19 17:04:07 +0000
committermdf <mdf@FreeBSD.org>2011-01-19 17:04:07 +0000
commit6648b8cede12bffb36e7260cfcf022cf2315acf1 (patch)
tree5e1c41064fb9146dbfbbbd14965e9bed5fb07985 /sys/net/vnet.h
parenta7310f271d99214ed08e3b1b382ffcd076a9d2b5 (diff)
downloadFreeBSD-src-6648b8cede12bffb36e7260cfcf022cf2315acf1.zip
FreeBSD-src-6648b8cede12bffb36e7260cfcf022cf2315acf1.tar.gz
sysctl(8) should use the CTLTYPE to determine the type of data when
reading. (This was already done for writing to a sysctl). This requires all SYSCTL setups to specify a type. Most of them are now checked at compile-time. Remove SYSCTL_*X* sysctl additions as the print being in hex should be controlled by the -x flag to sysctl(8). Succested by: bde
Diffstat (limited to 'sys/net/vnet.h')
-rw-r--r--sys/net/vnet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index 76123c7..9292145 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -236,6 +236,7 @@ int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS);
ptr, val, vnet_sysctl_handle_int, "I", descr)
#define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \
fmt, descr) \
+ CTASSERT(((access) & CTLTYPE) != 0); \
SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \
handler, fmt, descr)
#define SYSCTL_VNET_OPAQUE(parent, nbr, name, access, ptr, len, fmt, \
OpenPOWER on IntegriCloud