diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index c9451e023125debfb727fd64107efa07df6e4f6a..39c4069bb680d64dfac442f9a94680a240b24a00 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -8968,7 +8968,7 @@ NM_UTILS_FLAGS2STR_DEFINE (nm_unmanaged_flags2str, NMUnmanagedFlags, NM_UTILS_FLAGS2STR (NM_UNMANAGED_PLATFORM_INIT, "platform-init"), NM_UTILS_FLAGS2STR (NM_UNMANAGED_USER_EXPLICIT, "user-explicit"), NM_UTILS_FLAGS2STR (NM_UNMANAGED_BY_DEFAULT, "by-default"), - NM_UTILS_FLAGS2STR (NM_UNMANAGED_USER_CONFIG, "user-config"), + NM_UTILS_FLAGS2STR (NM_UNMANAGED_USER_SETTINGS, "user-settings"), NM_UTILS_FLAGS2STR (NM_UNMANAGED_USER_UDEV, "user-udev"), NM_UTILS_FLAGS2STR (NM_UNMANAGED_EXTERNAL_DOWN, "external-down"), NM_UTILS_FLAGS2STR (NM_UNMANAGED_IS_SLAVE, "is-slave"), @@ -9029,7 +9029,7 @@ _get_managed_by_flags(NMUnmanagedFlags flags, NMUnmanagedFlags mask, gboolean fo * Some flags are authoritative, meaning they always cause * the device to be unmanaged (e.g. @NM_UNMANAGED_PLATFORM_INIT). * - * OTOH, some flags can be overwritten. For example NM_UNMANAGED_USER_CONFIG + * OTOH, some flags can be overwritten. For example NM_UNMANAGED_USER_SETTINGS * is ignored once NM_UNMANAGED_USER_EXPLICIT is set. The idea is that * the flag from the configuration has no effect once the user explicitly * touches the unmanaged flags. */ @@ -9051,26 +9051,26 @@ _get_managed_by_flags(NMUnmanagedFlags flags, NMUnmanagedFlags mask, gboolean fo flags &= ~NM_UNMANAGED_USER_EXPLICIT; } - if ( NM_FLAGS_ANY (mask, NM_UNMANAGED_USER_CONFIG) - && !NM_FLAGS_ANY (flags, NM_UNMANAGED_USER_CONFIG)) { - /* NM_UNMANAGED_USER_CONFIG can only explicitly unmanage a device. It cannot - * *manage* it. Having NM_UNMANAGED_USER_CONFIG explicitly not set, is the + if ( NM_FLAGS_ANY (mask, NM_UNMANAGED_USER_SETTINGS) + && !NM_FLAGS_ANY (flags, NM_UNMANAGED_USER_SETTINGS)) { + /* NM_UNMANAGED_USER_SETTINGS can only explicitly unmanage a device. It cannot + * *manage* it. Having NM_UNMANAGED_USER_SETTINGS explicitly not set, is the * same as having it not set at all. */ - mask &= ~NM_UNMANAGED_USER_CONFIG; + mask &= ~NM_UNMANAGED_USER_SETTINGS; } - if (NM_FLAGS_ANY (mask, NM_UNMANAGED_USER_UDEV | NM_UNMANAGED_USER_CONFIG)) { + if (NM_FLAGS_ANY (mask, NM_UNMANAGED_USER_UDEV | NM_UNMANAGED_USER_SETTINGS)) { /* configuration from udev or nm-config overwrites the by-default flag * which is based on the device type. */ flags &= ~NM_UNMANAGED_BY_DEFAULT; } - if (NM_FLAGS_HAS (mask, NM_UNMANAGED_USER_CONFIG)) { + if (NM_FLAGS_HAS (mask, NM_UNMANAGED_USER_SETTINGS)) { /* configuration from configuration overwrites the setting * originating from udev. * * Actually, this check has no effect, because at this point, - * the device also is NM_UNMANAGED_USER_CONFIG. Thus clearing + * the device also is NM_UNMANAGED_USER_SETTINGS. Thus clearing * NM_UNMANAGED_USER_UDEV doesn't change the outcome. * Just be explicit about this. */ flags &= ~NM_UNMANAGED_USER_UDEV; @@ -9087,7 +9087,7 @@ _get_managed_by_flags(NMUnmanagedFlags flags, NMUnmanagedFlags mask, gboolean fo * are ignored. */ flags &= ~( NM_UNMANAGED_BY_DEFAULT - | NM_UNMANAGED_USER_CONFIG + | NM_UNMANAGED_USER_SETTINGS | NM_UNMANAGED_USER_UDEV | NM_UNMANAGED_EXTERNAL_DOWN); } @@ -9294,7 +9294,7 @@ nm_device_set_unmanaged_by_user_config (NMDevice *self, const GSList *unmanaged_ unmanaged = nm_device_spec_match_list (self, unmanaged_specs); nm_device_set_unmanaged_by_flags (self, - NM_UNMANAGED_USER_CONFIG, + NM_UNMANAGED_USER_SETTINGS, unmanaged, unmanaged ? NM_DEVICE_STATE_REASON_NOW_UNMANAGED diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index e203d2a5f59ec0a60c2ed29f1ef1f5bdb1c997b0..e9f7b909b2c9c48430f3cf165a9ce28470ac559b 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -432,7 +432,9 @@ RfKillType nm_device_get_rfkill_type (NMDevice *device); * (e.g. via a D-Bus command) * @NM_UNMANAGED_BY_DEFAULT: %TRUE for certain device types where we unmanage * them by default - * @NM_UNMANAGED_USER_CONFIG: %TRUE when unmanaged by user decision (via unmanaged-specs) + * @NM_UNMANAGED_USER_SETTINGS: %TRUE when unmanaged by user decision via + * the settings plugin (for example keyfile.unmanaged-devices or ifcfg-rh's + * NM_CONTROLLED=no) * @NM_UNMANAGED_USER_UDEV: %TRUE when unmanaged by user decision (via UDev rule) * @NM_UNMANAGED_EXTERNAL_DOWN: %TRUE when unmanaged because !IFF_UP and not created by NM * @NM_UNMANAGED_IS_SLAVE: indicates that the device is enslaved. Note that @@ -454,7 +456,7 @@ typedef enum { /*< skip >*/ /* These flags can be non-effective and be overwritten * by other flags. */ NM_UNMANAGED_BY_DEFAULT = (1LL << 8), - NM_UNMANAGED_USER_CONFIG = (1LL << 9), + NM_UNMANAGED_USER_SETTINGS = (1LL << 9), NM_UNMANAGED_USER_UDEV = (1LL << 10), NM_UNMANAGED_EXTERNAL_DOWN = (1LL << 11), NM_UNMANAGED_IS_SLAVE = (1LL << 12),