diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-06-29 19:54:35 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-06-30 10:46:35 +0200 |
commit | 64e7ebde8bcb3981781903f18ac17da0852fb653 (patch) | |
tree | 7eedb35afa90b745399a5dcbc1b29cc91997578d /src/network/networkctl.c | |
parent | Merge pull request #12910 from keszybz/udev-kvm (diff) | |
download | systemd-64e7ebde8bcb3981781903f18ac17da0852fb653.tar.xz systemd-64e7ebde8bcb3981781903f18ac17da0852fb653.zip |
networkctl: do not show '(null)' in HW Address entry
This also fixes indentation.
Diffstat (limited to 'src/network/networkctl.c')
-rw-r--r-- | src/network/networkctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 5d91779395..2a748b8599 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -1034,8 +1034,8 @@ static int link_status_one( if (r < 0) return r; r = table_add_cell_stringf(table, NULL, "%s%s%s (%s%s%s)", - on_color_operational, strna(operational_state), off_color_operational, - on_color_setup, strna(setup_state), off_color_setup); + on_color_operational, strna(operational_state), off_color_operational, + on_color_setup, strna(setup_state), off_color_setup); if (r < 0) return r; @@ -1097,10 +1097,10 @@ static int link_status_one( if (r < 0) return r; r = table_add_cell_stringf(table, NULL, "%s%s%s%s", - ether_addr_to_string(&info->mac_address, ea), - description ? " (" : "", - description, - description ? ")" : ""); + ether_addr_to_string(&info->mac_address, ea), + description ? " (" : "", + strempty(description), + description ? ")" : ""); if (r < 0) return r; } |