summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-08-25 11:19:10 +0200
committerThomas Haller <thaller@redhat.com>2018-09-05 11:41:40 +0200
commita07e4f5e8602da6514f1f77eff0ccb55797e2767 (patch)
treeb949a9f5b65dcb9cdd5edf3848103ea0817865e2
parent951c0bd94ebc37d6bdce130866b420a35f2f84b0 (diff)
downloadNetworkManager-a07e4f5e8602da6514f1f77eff0ccb55797e2767.tar.gz
settings/ifupdown: drop unused define ALWAYS_UNMANAGE in plugin
This is only useful for testing. But since the managed flag is configurable via NetworkManager.conf, there is no point in having a define as well. If you want to test it, just configure it. And if you really want to patch the code, then patch "priv->unmanage_well_known" to be always TRUE.
-rw-r--r--src/settings/plugins/ifupdown/nms-ifupdown-plugin.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
index a90162b599..4f8741c17c 100644
--- a/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
+++ b/src/settings/plugins/ifupdown/nms-ifupdown-plugin.c
@@ -52,11 +52,6 @@
#define IFUPDOWN_UNMANAGE_WELL_KNOWN_DEFAULT TRUE
-/* #define ALWAYS_UNMANAGE TRUE */
-#ifndef ALWAYS_UNMANAGE
-#define ALWAYS_UNMANAGE FALSE
-#endif
-
/*****************************************************************************/
typedef struct {
@@ -180,7 +175,7 @@ udev_device_added (SettingsPluginIfupdown *self, struct udev_device *device)
if (exported)
bind_device_to_connection (self, device, exported);
- if (ALWAYS_UNMANAGE || priv->unmanage_well_known)
+ if (priv->unmanage_well_known)
_nm_settings_plugin_emit_signal_unmanaged_specs_changed (NM_SETTINGS_PLUGIN (self));
}
@@ -200,7 +195,7 @@ udev_device_removed (SettingsPluginIfupdown *self, struct udev_device *device)
if (!g_hash_table_remove (priv->kernel_ifaces, iface))
return;
- if (ALWAYS_UNMANAGE || priv->unmanage_well_known)
+ if (priv->unmanage_well_known)
_nm_settings_plugin_emit_signal_unmanaged_specs_changed (NM_SETTINGS_PLUGIN (self));
}
@@ -220,7 +215,7 @@ udev_device_changed (SettingsPluginIfupdown *self, struct udev_device *device)
if (!g_hash_table_lookup (priv->kernel_ifaces, iface))
return;
- if (ALWAYS_UNMANAGE || priv->unmanage_well_known)
+ if (priv->unmanage_well_known)
_nm_settings_plugin_emit_signal_unmanaged_specs_changed (NM_SETTINGS_PLUGIN (self));
}
@@ -282,7 +277,7 @@ get_unmanaged_specs (NMSettingsPlugin *plugin)
struct udev_device *device;
const char *iface;
- if (!ALWAYS_UNMANAGE && !priv->unmanage_well_known)
+ if (!priv->unmanage_well_known)
return NULL;
_LOGD ("unmanaged-specs: unmanaged devices count %u",