Skip to content

Commit

Permalink
fix: Matching error in getDeviceName
Browse files Browse the repository at this point in the history
  • Loading branch information
CheerChen authored Aug 8, 2022
1 parent f2f2916 commit 10559b8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/device_plugin/device_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ func getDeviceName(deviceID string) string {
log.Printf("Error processing pci.ids file at line: %s", line)
return deviceName
}
// fix matching
if splits[0] != "" {
continue
}
deviceName = strings.TrimSpace(splits[1])
deviceName = strings.ToUpper(deviceName)
deviceName = strings.Replace(deviceName, "/", "_", -1)
Expand Down

0 comments on commit 10559b8

Please sign in to comment.