diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-09-07 22:03:22 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-09-07 22:03:22 +0000 |
commit | daee4368eb35e6c2c98ef0e5ae9ab710b8ed330e (patch) | |
tree | f3600b7fe25b434878c4825fe7a705b7f522941e /sys | |
parent | 174420bbd24b39ae1774522e7efaea7db212ef6f (diff) |
Fix PR 2051, tested by miod@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sysctl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 9b642481e68..05fb51eecf0 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sysctl.c,v 1.56 2001/08/18 03:32:16 art Exp $ */ +/* $OpenBSD: kern_sysctl.c,v 1.57 2001/09/07 22:03:21 angelos Exp $ */ /* $NetBSD: kern_sysctl.c,v 1.17 1996/05/20 17:49:05 mrg Exp $ */ /*- @@ -455,7 +455,11 @@ hw_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) err = sysctl_diskinit(0, p); if (err) return err; - return (sysctl_rdstring(oldp, oldlenp, newp, disknames)); + if (disknames) + return (sysctl_rdstring(oldp, oldlenp, newp, + disknames)); + else + return (sysctl_rdstring(oldp, oldlenp, newp, "")); case HW_DISKSTATS: err = sysctl_diskinit(1, p); if (err) |