diff options
Diffstat (limited to 'cmd/mount_zfs/mount_zfs.c')
-rw-r--r-- | cmd/mount_zfs/mount_zfs.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/cmd/mount_zfs/mount_zfs.c b/cmd/mount_zfs/mount_zfs.c index 7928ff117..47f2a9ed9 100644 --- a/cmd/mount_zfs/mount_zfs.c +++ b/cmd/mount_zfs/mount_zfs.c @@ -607,10 +607,23 @@ main(int argc, char **argv) "failed for unknown reason.\n"), dataset); } return (MOUNT_SYSERR); +#ifdef MS_MANDLOCK + case EPERM: + if (mntflags & MS_MANDLOCK) { + (void) fprintf(stderr, gettext("filesystem " + "'%s' has the 'nbmand=on' property set, " + "this mount\noption may be disabled in " + "your kernel. Use 'zfs set nbmand=off'\n" + "to disable this option and try to " + "mount the filesystem again.\n"), dataset); + return (MOUNT_SYSERR); + } + /* fallthru */ +#endif default: (void) fprintf(stderr, gettext("filesystem " - "'%s' can not be mounted due to error " - "%d\n"), dataset, errno); + "'%s' can not be mounted: %s\n"), dataset, + strerror(errno)); return (MOUNT_USAGE); } } |