zpool: get: there's one fewer column than in zfs get
The current code allows -o name,property,value,source,name Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #12996
This commit is contained in:
parent
15aca3ad59
commit
c79787845d
|
@ -10106,7 +10106,7 @@ zpool_do_get(int argc, char **argv)
|
||||||
{ GET_COL_NAME, GET_COL_PROPERTY, GET_COL_VALUE,
|
{ GET_COL_NAME, GET_COL_PROPERTY, GET_COL_VALUE,
|
||||||
GET_COL_SOURCE };
|
GET_COL_SOURCE };
|
||||||
|
|
||||||
if (i == ZFS_GET_NCOLS) {
|
if (i == ZFS_GET_NCOLS - 1) {
|
||||||
(void) fprintf(stderr, gettext("too "
|
(void) fprintf(stderr, gettext("too "
|
||||||
"many fields given to -o "
|
"many fields given to -o "
|
||||||
"option\n"));
|
"option\n"));
|
||||||
|
@ -10133,7 +10133,7 @@ found:
|
||||||
|
|
||||||
memcpy(cb.cb_columns, col_cols,
|
memcpy(cb.cb_columns, col_cols,
|
||||||
sizeof (col_cols));
|
sizeof (col_cols));
|
||||||
i = ZFS_GET_NCOLS;
|
i = ZFS_GET_NCOLS - 1;
|
||||||
} else
|
} else
|
||||||
cb.cb_columns[i++] = col_cols[c];
|
cb.cb_columns[i++] = col_cols[c];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue