mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
fix(host): fix isolated device detection regex for PCI and USB devices (#24690)
This commit is contained in:
@@ -55,7 +55,7 @@ var (
|
||||
const (
|
||||
BUSID_REGEX = `[0-9a-fA-F]{2}:[0-9a-fA-F]{2}\.[0-9a-fA-F]`
|
||||
CODE_REGEX = `[0-9a-fA-F]{4}`
|
||||
LABEL_REGEX = `[\w+\ \.\,\:\+\&\-\/\[\]\(\)]+`
|
||||
LABEL_REGEX = `[\w+\ \.\,\:\;\+\&\-\/\[\]\(\)]+`
|
||||
|
||||
VFIO_PCI_KERNEL_DRIVER = "vfio-pci"
|
||||
DEFAULT_VGA_CMD = " -vga std"
|
||||
|
||||
@@ -381,9 +381,9 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
lsusbTreeRootBusRegex = `(?P<prefix>(.*))Bus (?P<bus_id>([0-9]{2}))\.`
|
||||
lsusbTreeBusSuffixRegex = `Port (?P<port_id>([0-9]{1,2})): Dev (?P<device>([0-9]{1,2})), Class=(?P<class>(.*)), Driver=(?P<driver>(.*)),\s{0,1}(?P<speed>(.*))`
|
||||
lsusbTreeSuffixRegex = `Port (?P<port_id>([0-9]{1,2})): Dev (?P<device>([0-9]{1,2})), If (?P<interface>([0-9]{1,2})), Class=(?P<class>(.*)), Driver=(?P<driver>(.*)),\s{0,1}(?P<speed>(.*))`
|
||||
lsusbTreeRootBusRegex = `(?P<prefix>(.*))Bus (?P<bus_id>([0-9]{1,3}))\.`
|
||||
lsusbTreeBusSuffixRegex = `Port (?P<port_id>([0-9]{1,3})): Dev (?P<device>([0-9]{1,3})), Class=(?P<class>(.*)), Driver=(?P<driver>(.*)),\s{0,1}(?P<speed>(.*))`
|
||||
lsusbTreeSuffixRegex = `Port (?P<port_id>([0-9]{1,3})): Dev (?P<device>([0-9]{1,3})), If (?P<interface>([0-9]{1,2})), Class=(?P<class>(.*)), Driver=(?P<driver>(.*)),\s{0,1}(?P<speed>(.*))`
|
||||
lsusbTreeRootBusLineRegex = lsusbTreeRootBusRegex + lsusbTreeBusSuffixRegex
|
||||
lsusbTreeLineRegex = `(?P<prefix>(.*))` + lsusbTreeSuffixRegex
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user