diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-22 21:33:00 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-06-22 21:33:00 +0000 |
commit | 9ec5efd289d90d32215e20da84e44c2d58520617 (patch) | |
tree | 0bbb86e8c6a4c3b08344d45434ada8d7d4126089 /sys/kern/kern_sysctl.c | |
parent | 5938db6b99f3318a6d269b361d6484f3ac90c82d (diff) |
provide sysctl iface for msgbuf; raadtified
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index c795c862ee5..8f024c25692 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.49 2001/06/03 18:40:23 deraadt Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.50 2001/06/22 21:32:58 mickey Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -385,6 +385,12 @@ kern_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) if (!msgbufp || msgbufp->msg_magic != MSG_MAGIC) return (ENXIO); return (sysctl_rdint(oldp, oldlenp, newp, msgbufp->msg_bufs)); + case KERN_MSGBUF: + /* see note above */ + if (!msgbufp || msgbufp->msg_magic != MSG_MAGIC) + return (ENXIO); + return (sysctl_rdstruct(oldp, oldlenp, newp, msgbufp, + msgbufp->msg_bufs + sizeof(*msgbufp) - 1)); case KERN_MALLOCSTATS: return (sysctl_malloc(name + 1, namelen - 1, oldp, oldlenp, newp, newlen, p)); |