summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/zfs/zfs_main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/src/cmd/zfs/zfs_main.c b/usr/src/cmd/zfs/zfs_main.c
index 89f7071bf3..c2735b0516 100644
--- a/usr/src/cmd/zfs/zfs_main.c
+++ b/usr/src/cmd/zfs/zfs_main.c
@@ -3052,7 +3052,7 @@ zfs_do_list(int argc, char **argv)
flags &= ~ZFS_ITER_PROP_LISTSNAPS;
while (*optarg != '\0') {
static char *type_subopts[] = { "filesystem",
- "volume", "snapshot", "bookmark",
+ "volume", "snapshot", "snap", "bookmark",
"all", NULL };
switch (getsubopt(&optarg, type_subopts,
@@ -3064,12 +3064,13 @@ zfs_do_list(int argc, char **argv)
types |= ZFS_TYPE_VOLUME;
break;
case 2:
+ case 3:
types |= ZFS_TYPE_SNAPSHOT;
break;
- case 3:
+ case 4:
types |= ZFS_TYPE_BOOKMARK;
break;
- case 4:
+ case 5:
types = ZFS_TYPE_DATASET |
ZFS_TYPE_BOOKMARK;
break;
@@ -6775,6 +6776,12 @@ main(int argc, char **argv)
cmdname = "receive";
/*
+ * The 'snap' command is an alias for 'snapshot'
+ */
+ if (strcmp(cmdname, "snap") == 0)
+ cmdname = "snapshot";
+
+ /*
* Special case '-?'
*/
if (strcmp(cmdname, "-?") == 0)