summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pciconf
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>2007-10-04 22:27:08 +0000
committerse <se@FreeBSD.org>2007-10-04 22:27:08 +0000
commitc78f419e4c6eeba75512da78b18560b4eb3bdb14 (patch)
treed3c1b437fa0dd0e943fc37d0ffe13d55ee159d32 /usr.sbin/pciconf
parent38b0f76e4a8bb685aa9eac22e1a6838bf32bccaf (diff)
downloadFreeBSD-src-c78f419e4c6eeba75512da78b18560b4eb3bdb14.zip
FreeBSD-src-c78f419e4c6eeba75512da78b18560b4eb3bdb14.tar.gz
Make selector parsing accept the dot "." as an alternative selector
with identical meaning as the colon ":". This is to support a syntax that is more similar to a PCI device specification in the device hints file. The selector is not fully compatible with the specification in the hints file, since entries in that file use a different prefix, which needs to be added to the getsel() routine, if full support of that syntax is found to be desirable. Approved by: re (Ken Smith)
Diffstat (limited to 'usr.sbin/pciconf')
-rw-r--r--usr.sbin/pciconf/pciconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c
index c679314..a6ac315 100644
--- a/usr.sbin/pciconf/pciconf.c
+++ b/usr.sbin/pciconf/pciconf.c
@@ -501,7 +501,7 @@ getsel(const char *str)
i = 0;
do {
selarr[i++] = strtoul(ep, &ep, 10);
- } while (*ep == ':' && *++ep != '\0' && i < 4);
+ } while ((*ep == ':' || *ep == '.') && *++ep != '\0' && i < 4);
if (i > 2)
sel.pc_func = selarr[--i];
OpenPOWER on IntegriCloud