Date: Fri, 4 Jul 2014 18:26:32 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r268263 - stable/9/sbin/sysctl Message-ID: <201407041826.s64IQWRC002020@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Fri Jul 4 18:26:32 2014 New Revision: 268263 URL: http://svnweb.freebsd.org/changeset/base/268263 Log: Undo MFC of r267960: This patch cannot be ported as-is to 9-stable. Modified: stable/9/sbin/sysctl/sysctl.c Directory Properties: stable/9/sbin/sysctl/ (props changed) Modified: stable/9/sbin/sysctl/sysctl.c ============================================================================== --- stable/9/sbin/sysctl/sysctl.c Fri Jul 4 16:17:15 2014 (r268262) +++ stable/9/sbin/sysctl/sysctl.c Fri Jul 4 18:26:32 2014 (r268263) @@ -582,10 +582,9 @@ show_var(int *oid, int nlen) warnx("malloc failed"); return (1); } - ctltype = (kind & CTLTYPE); len = j; i = sysctl(oid, nlen, val, &len, 0, 0); - if (i != 0 || (len == 0 && ctltype != CTLTYPE_STRING)) { + if (i || !len) { free(oval); return (1); } @@ -599,6 +598,7 @@ show_var(int *oid, int nlen) fmt = buf; oidfmt(oid, nlen, fmt, &kind); p = val; + ctltype = (kind & CTLTYPE); sign = ctl_sign[ctltype]; intlen = ctl_size[ctltype];
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407041826.s64IQWRC002020>