diff options
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/cmd/zfs/zfs_main.c | 20 | ||||
| -rw-r--r-- | usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h | 6 |
2 files changed, 15 insertions, 11 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c index f7cb699692..4a221b4d38 100644 --- a/usr/src/cmd/zfs/zfs_main.c +++ b/usr/src/cmd/zfs/zfs_main.c @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -2226,13 +2226,17 @@ unshare_unmount_path(int type, char *path, int flags, int is_manual) ret = zfs_unshareall(zhp); } } else { - if (strcmp(property, "legacy") == 0 && !is_manual) { - (void) fprintf(stderr, gettext("cannot unmount " - "'%s': legacy mountpoint\n"), - zfs_get_name(zhp)); - (void) fprintf(stderr, gettext("use umount(1M) " - "to unmount this filesystem\n")); - ret = 1; + if (strcmp(property, "legacy") == 0) { + if (is_manual) { + ret = zfs_unmount(zhp, NULL, flags); + } else { + (void) fprintf(stderr, gettext("cannot unmount " + "'%s': legacy mountpoint\n"), + zfs_get_name(zhp)); + (void) fprintf(stderr, gettext("use umount(1M) " + "to unmount this filesystem\n")); + ret = 1; + } } else { ret = zfs_unmountall(zhp, flags); } diff --git a/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h b/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h index f1a7fce52c..bd35fc108e 100644 --- a/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h +++ b/usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h @@ -20,7 +20,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -52,7 +52,7 @@ typedef struct zfs_stats { uint64_t zs_snapdir; uint64_t zs_acl_mode; uint64_t zs_acl_inherit; - char zs_mountpoint[MAXNAMELEN]; + char zs_mountpoint[MAXPATHLEN]; char zs_atime_setpoint[MAXNAMELEN]; char zs_recordsize_setpoint[MAXNAMELEN]; char zs_readonly_setpoint[MAXNAMELEN]; @@ -60,7 +60,7 @@ typedef struct zfs_stats { char zs_setuid_setpoint[MAXNAMELEN]; char zs_exec_setpoint[MAXNAMELEN]; char zs_mountpoint_setpoint[MAXNAMELEN]; - char zs_sharenfs[MAXNAMELEN]; + char zs_sharenfs[MAXPATHLEN]; char zs_sharenfs_setpoint[MAXNAMELEN]; char zs_snapdir_setpoint[MAXNAMELEN]; char zs_acl_mode_setpoint[MAXNAMELEN]; |
