summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/sys/sysctl.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 653dfd5..7c314e2 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -322,6 +322,13 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
sysctl_add_oid(ctx, parent, nbr, name, (access), \
ptr, arg, handler, fmt, __DESCR(descr))
+/*
+ * A macro to generate a read-only sysctl to indicate the presense of optional
+ * kernel features.
+ */
+#define FEATURE(name, desc) \
+ SYSCTL_INT(_kern_features, OID_AUTO, name, CTLFLAG_RD, 0, 1, desc)
+
#endif /* _KERNEL */
/*
@@ -621,6 +628,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
*/
extern struct sysctl_oid_list sysctl__children;
SYSCTL_DECL(_kern);
+SYSCTL_DECL(_kern_features);
SYSCTL_DECL(_kern_ipc);
SYSCTL_DECL(_kern_proc);
SYSCTL_DECL(_sysctl);
OpenPOWER on IntegriCloud