summaryrefslogtreecommitdiff
path: root/usr/src/cmd/zfs
diff options
context:
space:
mode:
authorlling <none@none>2006-01-13 15:46:26 -0800
committerlling <none@none>2006-01-13 15:46:26 -0800
commitc0ea9bc769226ea011b3fd674201707c2cf8cc77 (patch)
tree1972c1dd6f605f24bbcfdd4944099ba16a920f7d /usr/src/cmd/zfs
parent0dda3b2535beb01ed3c1ea620ab99cf119d3409e (diff)
downloadillumos-joyent-c0ea9bc769226ea011b3fd674201707c2cf8cc77.tar.gz
6372107 legacy "umount" command unmount filesystems in the subdirs when zfs mountpoint is a regular path
Diffstat (limited to 'usr/src/cmd/zfs')
-rw-r--r--usr/src/cmd/zfs/zfs_main.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c
index 4a221b4d38..856cf51526 100644
--- a/usr/src/cmd/zfs/zfs_main.c
+++ b/usr/src/cmd/zfs/zfs_main.c
@@ -2226,17 +2226,15 @@ unshare_unmount_path(int type, char *path, int flags, int is_manual)
ret = zfs_unshareall(zhp);
}
} else {
- 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;
- }
+ if (is_manual) {
+ ret = zfs_unmount(zhp, NULL, flags);
+ } else if (strcmp(property, "legacy") == 0) {
+ (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);
}