diff --git a/pkg/mount/mounter_linux.go b/pkg/mount/mounter_linux.go index 48837adde5..a0a1ad2364 100644 --- a/pkg/mount/mounter_linux.go +++ b/pkg/mount/mounter_linux.go @@ -53,7 +53,6 @@ func mount(device, target, mType string, flags uintptr, data string) error { flags: flags & pflags, err: err, } - return err } } diff --git a/pkg/system/lstat_unix.go b/pkg/system/lstat_unix.go index b76234a1a1..de5a1c0fb2 100644 --- a/pkg/system/lstat_unix.go +++ b/pkg/system/lstat_unix.go @@ -14,7 +14,7 @@ import ( func Lstat(path string) (*StatT, error) { s := &syscall.Stat_t{} if err := syscall.Lstat(path, s); err != nil { - return nil, &os.PathError{"Lstat", path, err} + return nil, &os.PathError{Op: "Lstat", Path: path, Err: err} } return fromStatT(s) } diff --git a/pkg/system/stat_unix.go b/pkg/system/stat_unix.go index 146ac217e9..86bb6dd55e 100644 --- a/pkg/system/stat_unix.go +++ b/pkg/system/stat_unix.go @@ -60,7 +60,7 @@ func (s StatT) IsDir() bool { func Stat(path string) (*StatT, error) { s := &syscall.Stat_t{} if err := syscall.Stat(path, s); err != nil { - return nil, &os.PathError{"Stat", path, err} + return nil, &os.PathError{Op: "Stat", Path: path, Err: err} } return fromStatT(s) }