Skip to content

Commit a1ec175

Browse files
committed
print error message if sysfs read doesn't work
1 parent 0bbcba1 commit a1ec175

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/pci/pci.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"strings"
88

99
"github.com/fatih/color"
10+
"github.com/hertg/egpu-switcher/internal/logger"
1011
"github.com/hertg/gopci/pkg/pci"
1112
)
1213

@@ -93,6 +94,7 @@ func ReadGPUs() []*GPU {
9394
}
9495
devices, err := pci.Scan(gpuFilter)
9596
if err != nil {
97+
logger.Error("unable to read pci information from sysfs: %s", err)
9698
panic("unable to read pci information from sysfs")
9799
}
98100
var gpus []*GPU

0 commit comments

Comments
 (0)