From f187d47fdb8b2005bdd53893c73968dd839c003a Mon Sep 17 00:00:00 2001 From: "jiajian.chi" Date: Thu, 12 Sep 2024 09:52:27 +0800 Subject: [PATCH] Signed-off-by: jiajian.chi On branch fixFibrechannel Changes to be committed: modified: sysfs/class_fibrechannel.go --- sysfs/class_fibrechannel.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/sysfs/class_fibrechannel.go b/sysfs/class_fibrechannel.go index 9aac783d..7b571a45 100644 --- a/sysfs/class_fibrechannel.go +++ b/sysfs/class_fibrechannel.go @@ -153,12 +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