summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zfs
diff options
context:
space:
mode:
authorlling <none@none>2006-01-03 19:45:00 -0800
committerlling <none@none>2006-01-03 19:45:00 -0800
commit6b90ca488b504d3422b169269c3a86ccad80322c (patch)
tree0142bf32621944a62026a549d92b3685d85e1b2d /usr/src/cmd/zfs
parentea4282e98e4f93a9d8ad1e9d26bd4e45d99eeb9f (diff)
downloadillumos-gate-6b90ca488b504d3422b169269c3a86ccad80322c.tar.gz
6347801 internal error: unexpected error 79 at line 1617 of ../common/libzfs_dataset.c
6365038 Legacy umount [dir] will also unmount filesystems mounted in subdirectories of [dir]
Diffstat (limited to 'usr/src/cmd/zfs')
-rw-r--r--usr/src/cmd/zfs/zfs_main.c20
1 files changed, 12 insertions, 8 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);
}