]> git.proxmox.com Git - mirror_zfs-debian.git/blobdiff - cmd/mount_zfs/mount_zfs.c
New upstream version 0.6.5.10
[mirror_zfs-debian.git] / cmd / mount_zfs / mount_zfs.c
index b6f58b9b32bfd0329a62ca96bd3d2d6ee24288f0..39a407be6f3e3c815b621272f7ec7bfb3596b8ea 100644 (file)
@@ -608,10 +608,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);
                }
        }