Skip to content

Commit cdcb1f1

Browse files
tonistiigicrazy-max
authored andcommitted
contrib: remove unused code from nvidia setup
Signed-off-by: Tonis Tiigi <[email protected]>
1 parent 54c73d1 commit cdcb1f1

File tree

2 files changed

+0
-73
lines changed

2 files changed

+0
-73
lines changed

contrib/cdisetup/nvidia/apt.go

Lines changed: 0 additions & 45 deletions
This file was deleted.

contrib/cdisetup/nvidia/nvidia.go

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -302,31 +302,3 @@ func isDebianOrUbuntu() (bool, error) {
302302

303303
return id == "debian" || id == "ubuntu", nil
304304
}
305-
306-
func checkSBSA() (bool, error) {
307-
file, err := os.Open("/proc/cpuinfo")
308-
if err != nil {
309-
return false, errors.Errorf("failed to open /proc/cpuinfo: %v", err)
310-
}
311-
defer file.Close()
312-
313-
serverVendors := []string{"Ampere", "Graviton", "Marvell", "ThunderX"}
314-
315-
scanner := bufio.NewScanner(file)
316-
for scanner.Scan() {
317-
line := scanner.Text()
318-
if strings.HasPrefix(line, "model name") || strings.HasPrefix(line, "Hardware") || strings.HasPrefix(line, "vendor_id") {
319-
for _, vendor := range serverVendors {
320-
if strings.Contains(line, vendor) {
321-
return true, nil // Likely SBSA
322-
}
323-
}
324-
}
325-
}
326-
327-
if err := scanner.Err(); err != nil {
328-
return false, errors.Errorf("error reading /proc/cpuinfo: %v", err)
329-
}
330-
331-
return false, nil // Generic ARM64
332-
}

0 commit comments

Comments
 (0)