Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sysfs/class_fibrechannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ func parseFibreChannelStatistics(hostPath string) (*FibreChannelCounters, error)
var counters FibreChannelCounters

path := filepath.Join(hostPath, "statistics")
if _, err := os.Stat(path); os.IsNotExist(err) {
fmt.Printf("Directory %s does not exist, skipping.\n", path)
return &counters, nil
}
files, err := os.ReadDir(path)
if err != nil {
return nil, err
Expand Down