JSON output support for zpool version

This commit adds support for zpool version to output in JSON format
using '-j' option. Userland kernel module version is collected in nvlist
which  is later displayed in JSON format. man page for zpool is updated.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Signed-off-by: Umer Saleem <usaleem@ixsystems.com>
Closes #16217
This commit is contained in:
Umer Saleem
2024-04-22 14:22:12 +05:00
committed by Brian Behlendorf
parent cad4c0ef1a
commit 5cbdd5ea4f
2 changed files with 70 additions and 3 deletions
+5
View File
@@ -38,6 +38,7 @@
.Fl ?V
.Nm
.Cm version
.Op Fl j
.Nm
.Cm subcommand
.Op Ar arguments
@@ -79,10 +80,14 @@ Displays a help message.
.It Xo
.Nm
.Cm version
.Op Fl j
.Xc
Displays the software version of the
.Nm
userland utility and the ZFS kernel module.
Use
.Fl j
option to output in JSON format.
.El
.
.Ss Creation