mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
zpool: correctly align columns with -p
zpool_expand_proplist() now ignores pl_fixed if its new literal argument is true. The rest is a consequence of needing to pass that down. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiao?=~Dska <nabijaczleweli@nabijaczleweli.xyz> Closes #11202
This commit is contained in:
@@ -783,7 +783,8 @@ zpool_set_prop(zpool_handle_t *zhp, const char *propname, const char *propval)
|
||||
}
|
||||
|
||||
int
|
||||
zpool_expand_proplist(zpool_handle_t *zhp, zprop_list_t **plp)
|
||||
zpool_expand_proplist(zpool_handle_t *zhp, zprop_list_t **plp,
|
||||
boolean_t literal)
|
||||
{
|
||||
libzfs_handle_t *hdl = zhp->zpool_hdl;
|
||||
zprop_list_t *entry;
|
||||
@@ -862,13 +863,12 @@ zpool_expand_proplist(zpool_handle_t *zhp, zprop_list_t **plp)
|
||||
}
|
||||
|
||||
for (entry = *plp; entry != NULL; entry = entry->pl_next) {
|
||||
|
||||
if (entry->pl_fixed)
|
||||
if (entry->pl_fixed && !literal)
|
||||
continue;
|
||||
|
||||
if (entry->pl_prop != ZPROP_INVAL &&
|
||||
zpool_get_prop(zhp, entry->pl_prop, buf, sizeof (buf),
|
||||
NULL, B_FALSE) == 0) {
|
||||
NULL, literal) == 0) {
|
||||
if (strlen(buf) > entry->pl_width)
|
||||
entry->pl_width = strlen(buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user