From b55818fd12e408eb752c26b559844cbbb638a127 Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Sun, 17 May 2020 06:17:25 +0200 Subject: [PATCH] networkctl: Use bond util common functions --- src/network/networkctl.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 1a120970d95..91c1de1507b 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -18,6 +18,7 @@ #include "sd-network.h" #include "alloc-util.h" +#include "bond-util.h" #include "bus-common-errors.h" #include "bus-error.h" #include "bus-util.h" @@ -1531,22 +1532,10 @@ static int link_status_one( TABLE_STRING, bridge_state_to_string(info->port_state)); } } else if (streq_ptr(info->netdev_kind, "bond")) { - static const struct { - const char *mode; - } mode_table[] = { - { "balance-rr" }, - { "active-backup" }, - { "balance-xor" }, - { "broadcast" }, - { "802.3ad" }, - { "balance-tlb" }, - { "balance-alb" }, - }; - r = table_add_many(table, TABLE_EMPTY, TABLE_STRING, "Mode:", - TABLE_STRING, mode_table[info->mode], + TABLE_STRING, bond_mode_to_string(info->mode), TABLE_EMPTY, TABLE_STRING, "Miimon:", TABLE_TIMESPAN_MSEC, jiffies_to_usec(info->miimon), -- 2.47.3