ifcfg-rh: use svSetValueInt64_cond() to write MTU value
This commit is contained in:
@@ -768,10 +768,8 @@ write_wireless_setting (NMConnection *connection,
|
|||||||
g_free (blacklist_str);
|
g_free (blacklist_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
svUnsetValue (ifcfg, "MTU");
|
|
||||||
mtu = nm_setting_wireless_get_mtu (s_wireless);
|
mtu = nm_setting_wireless_get_mtu (s_wireless);
|
||||||
if (mtu)
|
svSetValueInt64_cond (ifcfg, "MTU", mtu != 0, mtu);
|
||||||
svSetValueInt64 (ifcfg, "MTU", mtu);
|
|
||||||
|
|
||||||
ssid = nm_setting_wireless_get_ssid (s_wireless);
|
ssid = nm_setting_wireless_get_ssid (s_wireless);
|
||||||
if (!ssid) {
|
if (!ssid) {
|
||||||
@@ -954,10 +952,8 @@ write_infiniband_setting (NMConnection *connection, shvarFile *ifcfg, GError **e
|
|||||||
mac = nm_setting_infiniband_get_mac_address (s_infiniband);
|
mac = nm_setting_infiniband_get_mac_address (s_infiniband);
|
||||||
svSetValueStr (ifcfg, "HWADDR", mac);
|
svSetValueStr (ifcfg, "HWADDR", mac);
|
||||||
|
|
||||||
svUnsetValue (ifcfg, "MTU");
|
|
||||||
mtu = nm_setting_infiniband_get_mtu (s_infiniband);
|
mtu = nm_setting_infiniband_get_mtu (s_infiniband);
|
||||||
if (mtu)
|
svSetValueInt64_cond (ifcfg, "MTU", mtu != 0, mtu);
|
||||||
svSetValueInt64 (ifcfg, "MTU", mtu);
|
|
||||||
|
|
||||||
transport_mode = nm_setting_infiniband_get_transport_mode (s_infiniband);
|
transport_mode = nm_setting_infiniband_get_transport_mode (s_infiniband);
|
||||||
svSetValueBoolean (ifcfg, "CONNECTED_MODE", nm_streq (transport_mode, "connected"));
|
svSetValueBoolean (ifcfg, "CONNECTED_MODE", nm_streq (transport_mode, "connected"));
|
||||||
@@ -1018,10 +1014,8 @@ write_wired_setting (NMConnection *connection, shvarFile *ifcfg, GError **error)
|
|||||||
g_free (blacklist_str);
|
g_free (blacklist_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
svUnsetValue (ifcfg, "MTU");
|
|
||||||
mtu = nm_setting_wired_get_mtu (s_wired);
|
mtu = nm_setting_wired_get_mtu (s_wired);
|
||||||
if (mtu)
|
svSetValueInt64 (ifcfg, "MTU", mtu != 0, mtu);
|
||||||
svSetValueInt64 (ifcfg, "MTU", mtu);
|
|
||||||
|
|
||||||
svUnsetValue (ifcfg, "SUBCHANNELS");
|
svUnsetValue (ifcfg, "SUBCHANNELS");
|
||||||
s390_subchannels = nm_setting_wired_get_s390_subchannels (s_wired);
|
s390_subchannels = nm_setting_wired_get_s390_subchannels (s_wired);
|
||||||
@@ -1189,10 +1183,7 @@ write_wired_for_virtual (NMConnection *connection, shvarFile *ifcfg)
|
|||||||
nm_setting_wired_get_generate_mac_address_mask (s_wired));
|
nm_setting_wired_get_generate_mac_address_mask (s_wired));
|
||||||
|
|
||||||
mtu = nm_setting_wired_get_mtu (s_wired);
|
mtu = nm_setting_wired_get_mtu (s_wired);
|
||||||
if (mtu)
|
svSetValueInt64_cond (ifcfg, "MTU", mtu != 0, mtu);
|
||||||
svSetValueInt64 (ifcfg, "MTU", mtu);
|
|
||||||
else
|
|
||||||
svUnsetValue (ifcfg, "MTU");
|
|
||||||
}
|
}
|
||||||
return has_wired;
|
return has_wired;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user