mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Support '-H' (scripted mode) to 'zpool get'
This functionality is already available in 'zfs get'. Providing it for 'zpool get' is useful and good for consistency. Signed-off-by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes: #2522
This commit is contained in:
parent
a60e668bd2
commit
79eb71dc6c
@ -266,7 +266,7 @@ get_usage(zpool_help_t idx) {
|
|||||||
case HELP_EVENTS:
|
case HELP_EVENTS:
|
||||||
return (gettext("\tevents [-vHfc]\n"));
|
return (gettext("\tevents [-vHfc]\n"));
|
||||||
case HELP_GET:
|
case HELP_GET:
|
||||||
return (gettext("\tget [-p] <\"all\" | property[,...]> "
|
return (gettext("\tget [-pH] <\"all\" | property[,...]> "
|
||||||
"<pool> ...\n"));
|
"<pool> ...\n"));
|
||||||
case HELP_SET:
|
case HELP_SET:
|
||||||
return (gettext("\tset <property=value> <pool> \n"));
|
return (gettext("\tset <property=value> <pool> \n"));
|
||||||
@ -5617,12 +5617,16 @@ zpool_do_get(int argc, char **argv)
|
|||||||
int c, ret;
|
int c, ret;
|
||||||
|
|
||||||
/* check options */
|
/* check options */
|
||||||
while ((c = getopt(argc, argv, "p")) != -1) {
|
while ((c = getopt(argc, argv, "pH")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'p':
|
case 'p':
|
||||||
cb.cb_literal = B_TRUE;
|
cb.cb_literal = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'H':
|
||||||
|
cb.cb_scripted = B_TRUE;
|
||||||
|
break;
|
||||||
|
|
||||||
case '?':
|
case '?':
|
||||||
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
(void) fprintf(stderr, gettext("invalid option '%c'\n"),
|
||||||
optopt);
|
optopt);
|
||||||
|
@ -62,7 +62,7 @@ zpool \- configures ZFS storage pools
|
|||||||
|
|
||||||
.LP
|
.LP
|
||||||
.nf
|
.nf
|
||||||
\fBzpool get\fR [\fB-p\fR] "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...
|
\fBzpool get\fR [\fB-pH\fR] "\fIall\fR" | \fIproperty\fR[,...] \fIpool\fR ...
|
||||||
.fi
|
.fi
|
||||||
|
|
||||||
.LP
|
.LP
|
||||||
@ -1079,6 +1079,17 @@ See the "Properties" section for more information on the available pool properti
|
|||||||
Display numbers in parseable (exact) values.
|
Display numbers in parseable (exact) values.
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
|
.sp
|
||||||
|
.ne 2
|
||||||
|
.mk
|
||||||
|
.na
|
||||||
|
\fB\fB-H\fR\fR
|
||||||
|
.ad
|
||||||
|
.RS 6n
|
||||||
|
.rt
|
||||||
|
Scripted mode. Do not display headers, and separate fields by a single tab instead of arbitrary space.
|
||||||
|
.RE
|
||||||
|
|
||||||
.RE
|
.RE
|
||||||
|
|
||||||
.sp
|
.sp
|
||||||
|
Loading…
Reference in New Issue
Block a user