mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-19 15:33:56 +00:00
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)
This commit is contained in:
parent
d23a84a0a8
commit
8818afb711
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=172448
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user