From: Yu Watanabe Date: Fri, 10 Jan 2020 03:12:00 +0000 (+0900) Subject: networkctl: set table width 0 when --full is specified X-Git-Tag: v245-rc1~151^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a42d94908003983a3064d65aca1ce2a88ddbc2cd;p=thirdparty%2Fsystemd.git networkctl: set table width 0 when --full is specified --- diff --git a/man/networkctl.xml b/man/networkctl.xml index 6b3702bfd3c..e34778ac218 100644 --- a/man/networkctl.xml +++ b/man/networkctl.xml @@ -316,7 +316,7 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR) - Do not ellipsize the logs in status command. + Do not ellipsize the output. diff --git a/src/network/networkctl.c b/src/network/networkctl.c index e6dc70a0e2b..de2f440b4c0 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -518,6 +518,9 @@ static int list_links(int argc, char *argv[], void *userdata) { if (!table) return log_oom(); + if (arg_full) + table_set_width(table, 0); + table_set_header(table, arg_legend); assert_se(cell = table_get_cell(table, 0, 0)); @@ -840,6 +843,9 @@ static int dump_address_labels(sd_netlink *rtnl) { if (!table) return -ENOMEM; + if (arg_full) + table_set_width(table, 0); + r = table_set_sort(table, 0, SIZE_MAX); if (r < 0) return r; @@ -1197,6 +1203,9 @@ static int link_status_one( if (!table) return -ENOMEM; + if (arg_full) + table_set_width(table, 0); + assert_se(cell = table_get_cell(table, 0, 0)); (void) table_set_ellipsize_percent(table, cell, 100); @@ -1575,6 +1584,9 @@ static int system_status(sd_netlink *rtnl, sd_hwdb *hwdb) { if (!table) return -ENOMEM; + if (arg_full) + table_set_width(table, 0); + assert_se(cell = table_get_cell(table, 0, 0)); (void) table_set_ellipsize_percent(table, cell, 100); @@ -1742,6 +1754,9 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) { if (!table) return -ENOMEM; + if (arg_full) + table_set_width(table, 0); + table_set_header(table, arg_legend); assert_se(cell = table_get_cell(table, 0, 0));