From e766e8fc7bf52b4996d2969200dd706a599ef8ed Mon Sep 17 00:00:00 2001 From: drawdrop Date: Tue, 4 Mar 2025 00:14:00 +0800 Subject: [PATCH] fix: fix the wrong error return value Signed-off-by: drawdrop --- gofsutil_mount_unix.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gofsutil_mount_unix.go b/gofsutil_mount_unix.go index 4b4f116..acc059b 100644 --- a/gofsutil_mount_unix.go +++ b/gofsutil_mount_unix.go @@ -331,7 +331,7 @@ func (fs *FS) rescanSCSIHost(_ context.Context, targets []string, lun string) er } errs := f.Close() if errs != nil { - return err + return errs } } return nil @@ -363,7 +363,7 @@ func (fs *FS) rescanSCSIHost(_ context.Context, targets []string, lun string) er } errs := f.Close() if errs != nil { - return err + return errs } } return nil @@ -640,7 +640,7 @@ func (fs *FS) issueLIPToAllFCHosts(_ context.Context) error { } errs := f.Close() if errs != nil { - return err + return errs } } return savedError