We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f7fc619 + 8eb531b commit 954b839Copy full SHA for 954b839
cmd/compute-domain-kubelet-plugin/nvlib.go
@@ -237,7 +237,9 @@ func (l deviceLib) getDeviceMajor(name string) (int, error) {
237
// Extract the number as capture group (the first and only group).
238
"(?s)Character devices:.*?" +
239
"([0-9]+) " + regexp.QuoteMeta(name) +
240
- ".*Block devices:",
+ // Require `name` to be newline-terminated (to not match on a device
241
+ // that has `name` as prefix).
242
+ "\n.*Block devices:",
243
)
244
245
data, err := os.ReadFile(procDevicesPath)
0 commit comments