[runsc] When mount files, add arguments to error message

This commit is contained in:
Stepan Koltsov
2025-02-10 17:57:29 +00:00
parent 9c490f813d
commit 522d089494
+5 -1
View File
@@ -678,7 +678,11 @@ func SafeMount(src, dst, fstype string, flags uintptr, data, procPath string) er
return &ErrSymlinkMount{fmt.Errorf("failed to safely mount: expected to open %s, but found %s", dst, target)}
}
return unix.Mount(src, safePath, fstype, flags, data)
mountErr := unix.Mount(src, safePath, fstype, flags, data)
if mountErr != nil {
return fmt.Errorf("mount(%q, %q, %q, %#x, %q) failed: %w", src, safePath, fstype, flags, data, mountErr)
}
return nil
}
// RetryEintr retries the function until an error different than EINTR is