svn commit: r268263 - stable/9/sbin/sysctl

Hans Petter Selasky hselasky at FreeBSD.org
Fri Jul 4 18:26:32 UTC 2014


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];
 


More information about the svn-src-stable-9 mailing list