(paths *linuxpath.Paths, pciAddr *pciaddr.Address)
| 50 | } |
| 51 | |
| 52 | func getDeviceRevision(paths *linuxpath.Paths, pciAddr *pciaddr.Address) string { |
| 53 | revisionPath := filepath.Join( |
| 54 | paths.SysBusPciDevices, |
| 55 | pciAddr.String(), |
| 56 | "revision", |
| 57 | ) |
| 58 | |
| 59 | if _, err := os.Stat(revisionPath); err != nil { |
| 60 | return "" |
| 61 | } |
| 62 | revision, err := os.ReadFile(revisionPath) |
| 63 | if err != nil { |
| 64 | return "" |
| 65 | } |
| 66 | return strings.TrimSpace(string(revision)) |
| 67 | } |
| 68 | |
| 69 | func getDeviceNUMANode(ctx context.Context, pciAddr *pciaddr.Address) *topology.Node { |
| 70 | paths := linuxpath.New(ctx) |
no test coverage detected
searching dependent graphs…