mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-27 04:32:16 +03:00
libzfs: Add error message for why creating mountpoint failed
When zfs_mount_at() fails to stat the mountpoint and can't create the directory, we return an error with a message "failed to create mountpoint" but there is no indication why it failed. Add the error string from the syscall to the error aux message. Update do_mount for Linux to return the errno instead of -1. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10550
This commit is contained in:
@@ -569,7 +569,9 @@ do_mount(zfs_handle_t *zhp, const char *mntpt, char *opts, int flags)
|
||||
}
|
||||
strlcat(myopts, opts, MNT_LINE_MAX);
|
||||
zfs_adjust_mount_options(zhp, mntpt, myopts, NULL);
|
||||
error = mount(src, mntpt, MNTTYPE_ZFS, mntflags, myopts);
|
||||
if (mount(src, mntpt, MNTTYPE_ZFS, mntflags, myopts)) {
|
||||
return (errno);
|
||||
}
|
||||
} else {
|
||||
char *argv[9] = {
|
||||
"/bin/mount",
|
||||
|
||||
Reference in New Issue
Block a user