From e0454595c1a802013bfdf58146b1d833df7b0554 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 6 Sep 2022 10:29:33 +0200 Subject: [PATCH] fixup! bond: fix primary bond option when the link is not present - rename "missing_primary" to "primary_missing". Yes, in English, we would prefer "ADJECTIVE-NOUN" or "VERB-NONE", but for programming it seems useful to group common things by giving the same prefix. E.g. it might be better to have "prop1_get()", "prop1_del()" and "prop2_get()", instead of "get_prop1()", "del_prop1()" and "get_prop2()". The important part is the object/NOUN, not the attribute/verb. --- src/core/devices/nm-device-bond.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/devices/nm-device-bond.c b/src/core/devices/nm-device-bond.c index 447785c510..63c905b1e0 100644 --- a/src/core/devices/nm-device-bond.c +++ b/src/core/devices/nm-device-bond.c @@ -59,7 +59,7 @@ /*****************************************************************************/ typedef struct { - bool missing_primary; + bool primary_missing; } NMDeviceBondPrivate; struct _NMDeviceBond { @@ -500,7 +500,7 @@ act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason) g_return_val_if_fail(s_bond, NM_ACT_STAGE_RETURN_FAILURE); _platform_lnk_bond_init_from_setting(s_bond, &props); - priv->missing_primary = _check_primary_missing(&props, s_bond); + priv->primary_missing = _check_primary_missing(&props, s_bond); /* Interface must be down to set bond options */ nm_device_take_down(device, TRUE); @@ -554,7 +554,7 @@ attach_port(NMDevice *device, nm_device_master_check_slave_physical_port(device, port, LOGD_BOND); - if (priv->missing_primary) { + if (priv->primary_missing) { NMSettingBond *s_bond; NMConnection *conn_bond; @@ -581,7 +581,7 @@ attach_port(NMDevice *device, "setting bond opts when attaching port %s: failed", nm_device_get_ip_iface(port)); else - priv->missing_primary = FALSE; + priv->primary_missing = FALSE; } } } @@ -697,7 +697,7 @@ create_and_realize(NMDevice *device, nm_assert(s_bond); _platform_lnk_bond_init_from_setting(s_bond, &props); - priv->missing_primary = _check_primary_missing(&props, s_bond); + priv->primary_missing = _check_primary_missing(&props, s_bond); r = nm_platform_link_bond_add(nm_device_get_platform(device), iface, &props, out_plink); if (r < 0) {