summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2017-01-22 11:13:53 +0000
committerbapt <bapt@FreeBSD.org>2017-01-22 11:13:53 +0000
commit0be96d965c6adc1c48e56f129d27948645389867 (patch)
tree713eca6f5a11d004783eb7571fe23d63c92ee761
parent633853136450e4563fdf10cdfe3a401791a7f0fa (diff)
downloadFreeBSD-src-0be96d965c6adc1c48e56f129d27948645389867.zip
FreeBSD-src-0be96d965c6adc1c48e56f129d27948645389867.tar.gz
MFC r311953 (by cem)
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
-rw-r--r--usr.sbin/pciconf/pciconf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index 1bc5526..bfbcf74 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -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;
OpenPOWER on IntegriCloud