X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fmount_zfs%2Fmount_zfs.c;h=45c291e04ce000ab3d56d84d6da58d4c8d7b1a28;hb=92e91da20839ee50536223bedf2ba4fb7d2fae71;hp=e97b2b8a5f8822fc7c11e144369e1385af4ec5fc;hpb=3613204cd7e3ab1ae658e31dac875e58827a6655;p=zfs.git diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index e97b2b8..45c291e 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -30,6 +30,7 @@ #include #include #include +#include #ifdef HAVE_LIBSELINUX #include #endif /* HAVE_LIBSELINUX */ @@ -96,6 +97,7 @@ static const option_map_t option_map[] = { { MNTOPT_QUIET, MS_SILENT, ZS_COMMENT }, #endif /* Custom zfs options */ + { MNTOPT_XATTR, MS_COMMENT, ZS_COMMENT }, { MNTOPT_NOXATTR, MS_COMMENT, ZS_COMMENT }, { MNTOPT_ZFSUTIL, MS_COMMENT, ZS_ZFSUTIL }, { NULL, 0, 0 } }; @@ -252,7 +254,7 @@ mtab_is_writeable(void) struct stat st; int error, fd; - error = stat(MNTTAB, &st); + error = lstat(MNTTAB, &st); if (error || S_ISLNK(st.st_mode)) return (0); @@ -479,6 +481,10 @@ main(int argc, char **argv) mntflags, mntopts); if (error) { switch (errno) { + case ENOENT: + (void) fprintf(stderr, gettext("mount point " + "'%s' does not exist\n"), mntpoint); + return (MOUNT_SYSERR); case EBUSY: (void) fprintf(stderr, gettext("filesystem " "'%s' is already mounted\n"), dataset);