Skip to content

Commit

Permalink
Merge pull request #53 from CheerChen/master
Browse files Browse the repository at this point in the history
fix: Matching error in getDeviceName
  • Loading branch information
rthallisey committed Sep 23, 2022
2 parents 201a1da + 10559b8 commit 1e20db6
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 1e20db6

Please sign in to comment.