From afb9fa67535f82bad4b2c5bd95ddf3ff1f278bdf Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Sat, 25 Aug 2018 11:19:10 +0200 Subject: [PATCH] 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. --- src/settings/plugins/ifupdown/nms-ifupdown-plugin.c | 13 ++++--------- 1 file 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",