summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorP.SCH <[email protected]>2012-04-09 09:05:54 +0300
committerBrian Behlendorf <[email protected]>2012-04-11 12:02:46 -0700
commitcf81b00a73fe47fdb21586ac1cc179b734540973 (patch)
treea12318becebf8d638185bb3ad553d6aa83ca60df /cmd
parent10b75496bb0cb7a7b8146c263164adc37f1d176a (diff)
ZFS list snapshot property alias
Add support for the `zfs list -t snap` alias which is available under Oracle Solaris 11. Signed-off-by: Brian Behlendorf <[email protected]> Closes #640
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zfs/zfs_main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 15e224d38..761c9f76a 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -229,7 +229,7 @@ get_usage(zfs_help_t idx)
return (gettext("\tlist [-rH][-d max] "
"[-o property[,...]] [-t type[,...]] [-s property] ...\n"
"\t [-S property] ... "
- "[filesystem|volume|snapshot] ...\n"));
+ "[filesystem|volume|snapshot|snap] ...\n"));
case HELP_MOUNT:
return (gettext("\tmount\n"
"\tmount [-vO] [-o opts] <-a | filesystem>\n"));
@@ -2766,7 +2766,7 @@ zfs_do_list(int argc, char **argv)
flags &= ~ZFS_ITER_PROP_LISTSNAPS;
while (*optarg != '\0') {
static char *type_subopts[] = { "filesystem",
- "volume", "snapshot", "all", NULL };
+ "volume", "snapshot", "snap", "all", NULL };
switch (getsubopt(&optarg, type_subopts,
&value)) {
@@ -2777,9 +2777,10 @@ 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_DATASET;
break;