Allow fake mounts to succeed on non-legacy filesystems.
[zfs.git] / cmd / mount_zfs / mount_zfs.c
index 6dd831d..9a82a2b 100644 (file)
@@ -474,7 +474,8 @@ main(int argc, char **argv)
                return (MOUNT_USAGE);
        }
 
-       if (!zfsutil && strcmp(legacy, ZFS_MOUNTPOINT_LEGACY) && !remount) {
+       if (!zfsutil && !(remount || fake) &&
+           strcmp(legacy, ZFS_MOUNTPOINT_LEGACY)) {
                (void) fprintf(stderr, gettext(
                    "filesystem '%s' cannot be mounted using 'mount'.\n"
                    "Use 'zfs set mountpoint=%s' or 'zfs mount %s'.\n"