mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
fwget: pci: hex strings use 0-9 and a-f not a-z
Reviewed by: imp, manu
Differential Revision: https://reviews.freebsd.org/D52311
(cherry picked from commit 50cab1202d)
This commit is contained in:
parent
53d1c328e9
commit
772579c13e
1 changed files with 3 additions and 3 deletions
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
pci_get_class()
|
||||
{
|
||||
local hexclass=$(echo $1 | sed 's/.*class=\(0x[0-9a-z]\{2\}\).*/\1/')
|
||||
local hexclass=$(echo $1 | sed 's/.*class=\(0x[0-9a-f]\{2\}\).*/\1/')
|
||||
case "${hexclass}" in
|
||||
0x00) echo "old" ;; # built before class codes were finalized
|
||||
0x02) echo "network" ;;
|
||||
|
|
@ -38,7 +38,7 @@ pci_get_class()
|
|||
|
||||
pci_get_vendor()
|
||||
{
|
||||
local hexvendor=$(echo $1 | sed 's/.*\ vendor=\(0x[0-9a-z]*\).*/\1/')
|
||||
local hexvendor=$(echo $1 | sed 's/.*\ vendor=\(0x[0-9a-f]*\).*/\1/')
|
||||
|
||||
case "${hexvendor}" in
|
||||
0x1002) echo "amd" ;;
|
||||
|
|
@ -52,7 +52,7 @@ pci_get_vendor()
|
|||
|
||||
pci_get_device()
|
||||
{
|
||||
local hexdevice=$(echo $1 | sed 's/.*\ device=\(0x[0-9a-z]*\).*/\1/')
|
||||
local hexdevice=$(echo $1 | sed 's/.*\ device=\(0x[0-9a-f]*\).*/\1/')
|
||||
|
||||
echo ${hexdevice}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue