svn commit: r311953 - head/usr.sbin/pciconf
Conrad E. Meyer
cem at FreeBSD.org
Thu Jan 12 00:34:38 UTC 2017
Author: cem
Date: Thu Jan 12 00:34:37 2017
New Revision: 311953
URL: https://svnweb.freebsd.org/changeset/base/311953
Log:
pciconf(8): Reallow trailing colon in selectors
Reallow device selectors to have a trailing colon, as documented in the
manual page. This was broken along with some unrelated cleanups in
r295806.
PR: 215979
Reported by: David Boyd <David.Boyd49 at twc.com>
Sponsored by: Dell EMC Isilon
Modified:
head/usr.sbin/pciconf/pciconf.c
Modified: head/usr.sbin/pciconf/pciconf.c
==============================================================================
--- head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:22:36 2017 (r311952)
+++ head/usr.sbin/pciconf/pciconf.c Thu Jan 12 00:34:37 2017 (r311953)
@@ -917,11 +917,8 @@ parsesel(const char *str)
while (isdigit(*ep) && i < 4) {
selarr[i++] = strtoul(ep, &eppos, 10);
ep = eppos;
- if (*ep == ':') {
+ if (*ep == ':')
ep++;
- if (*ep == '\0')
- i = 0;
- }
}
if (i > 0 && *ep == '\0') {
sel.pc_func = (i > 2) ? selarr[--i] : 0;
More information about the svn-src-all
mailing list