diff options
author | Stefan Eßer <se@FreeBSD.org> | 2007-10-04 22:27:08 +0000 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2007-10-04 22:27:08 +0000 |
commit | 8818afb711645009a88f43dd7bd8d09c756e5da8 (patch) | |
tree | d3c1b437fa0dd0e943fc37d0ffe13d55ee159d32 /usr.sbin/pciconf/pciconf.c | |
parent | d23a84a0a86545dc2818194e636c0c05c73b2950 (diff) |
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)
Notes
Notes:
svn path=/head/; revision=172448
Diffstat (limited to 'usr.sbin/pciconf/pciconf.c')
-rw-r--r-- | usr.sbin/pciconf/pciconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pciconf/pciconf.c b/usr.sbin/pciconf/pciconf.c index c67931422db4..a6ac3154655c 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]; |