mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
networkctl: set table width 0 when --full is specified
This commit is contained in:
@@ -316,7 +316,7 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR)
|
||||
<term><option>--full</option></term>
|
||||
|
||||
<listitem>
|
||||
<para>Do not ellipsize the logs in <command>status</command> command.</para>
|
||||
<para>Do not ellipsize the output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user