diff options
author | jhb <jhb@FreeBSD.org> | 2011-12-01 15:01:23 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-12-01 15:01:23 +0000 |
commit | 34790eafe042b2eeedd8503778544f84c30aa2e4 (patch) | |
tree | bf241f251695fdc2e4ea090878c793486690b660 | |
parent | 132ad7aa9b624e01c572592aeb815bac0f8a5940 (diff) | |
download | FreeBSD-src-34790eafe042b2eeedd8503778544f84c30aa2e4.zip FreeBSD-src-34790eafe042b2eeedd8503778544f84c30aa2e4.tar.gz |
If the -d flag is specified, ignore any new values specified and only
display the descriptions of specified nodes.
Reported by: Jason Hellenthal jhell of dataix net
MFC after: 2 weeks
-rw-r--r-- | sbin/sysctl/sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 608e1d9..738117f 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -201,7 +201,7 @@ parse(char *string) if (oidfmt(mib, len, fmt, &kind)) err(1, "couldn't find format of oid '%s'", bufp); - if (newval == NULL) { + if (newval == NULL || dflag) { if ((kind & CTLTYPE) == CTLTYPE_NODE) { if (dflag) { i = show_var(mib, len); |