aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob N <robn@despairlabs.com>2024-02-08 18:22:58 +0000
committerGitHub <noreply@github.com>2024-02-08 18:22:58 +0000
commita5a725440bcb2f4c4554be3e489f911e3dd60412 (patch)
tree8ff07e3737121afd2dfa4a717588d432f633bca3
parentcbe882298e4ddc3917dfaf239eca475fe06d62d4 (diff)
downloadsrc-a5a725440bcb2f4c4554be3e489f911e3dd60412.tar.gz
src-a5a725440bcb2f4c4554be3e489f911e3dd60412.zip
-rw-r--r--cmd/zfs/zfs_main.c22
-rw-r--r--man/man8/zfs-list.811
2 files changed, 26 insertions, 7 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index f67f6114d0f1..c2147c8f4acd 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -3672,15 +3672,25 @@ zfs_do_list(int argc, char **argv)
for (char *tok; (tok = strsep(&optarg, ",")); ) {
static const char *const type_subopts[] = {
- "filesystem", "volume",
- "snapshot", "snap",
+ "filesystem",
+ "fs",
+ "volume",
+ "vol",
+ "snapshot",
+ "snap",
"bookmark",
- "all" };
+ "all"
+ };
static const int type_types[] = {
- ZFS_TYPE_FILESYSTEM, ZFS_TYPE_VOLUME,
- ZFS_TYPE_SNAPSHOT, ZFS_TYPE_SNAPSHOT,
+ ZFS_TYPE_FILESYSTEM,
+ ZFS_TYPE_FILESYSTEM,
+ ZFS_TYPE_VOLUME,
+ ZFS_TYPE_VOLUME,
+ ZFS_TYPE_SNAPSHOT,
+ ZFS_TYPE_SNAPSHOT,
ZFS_TYPE_BOOKMARK,
- ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK };
+ ZFS_TYPE_DATASET | ZFS_TYPE_BOOKMARK
+ };
for (c = 0; c < ARRAY_SIZE(type_subopts); ++c)
if (strcmp(tok, type_subopts[c]) == 0) {
diff --git a/man/man8/zfs-list.8 b/man/man8/zfs-list.8
index 9f6a73ab956d..85bd3fbafced 100644
--- a/man/man8/zfs-list.8
+++ b/man/man8/zfs-list.8
@@ -29,7 +29,7 @@
.\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc.
.\"
-.Dd March 16, 2022
+.Dd February 8, 2024
.Dt ZFS-LIST 8
.Os
.
@@ -155,6 +155,15 @@ or
For example, specifying
.Fl t Sy snapshot
displays only snapshots.
+.Sy fs ,
+.Sy snap ,
+or
+.Sy vol
+can be used as aliases for
+.Sy filesystem ,
+.Sy snapshot ,
+or
+.Sy volume .
.El
.
.Sh EXAMPLES