Skip to content

Commit b76b002

Browse files
committed
CA-320563: re-submit for missing change on regex
PCI BDF format: up to 256 buses, each with up to 32 devices, each supporting eight functions. This commit fixes the regex match to include hex strings. Signed-off-by: Ming Lu <[email protected]>
1 parent 25c102a commit b76b002

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/network_utils.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ module Sysfs = struct
246246
try
247247
Sys.readdir ("/sys/bus/pci/drivers/" ^ driver)
248248
|> Array.to_list
249-
|> List.filter (Re.execp (Re.Perl.compile_pat "\\d+:[a-f\\d]+:[a-f\\d]+\\.\\d+"))
249+
|> List.filter (Re.execp (Re.Perl.compile_pat {|\d+:[a-f\d]+:[a-f\d]+\.\d|}))
250250
|> List.length
251251
with _ -> 0
252252

0 commit comments

Comments
 (0)