diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index b5d3af68c6..6d26ef8944 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -13463,6 +13463,12 @@ nm_device_get_initial_hw_address (NMDevice *self) */ gboolean nm_device_spec_match_list (NMDevice *self, const GSList *specs) +{ + return nm_device_spec_match_list_full (self, specs, FALSE); +} + +int +nm_device_spec_match_list_full (NMDevice *self, const GSList *specs, int no_match_value) { NMDeviceClass *klass; NMMatchSpecMatchType m; @@ -13478,7 +13484,17 @@ nm_device_spec_match_list (NMDevice *self, const GSList *specs) nm_device_get_driver_version (self), nm_device_get_permanent_hw_address (self), klass->get_s390_subchannels ? klass->get_s390_subchannels (self) : NULL); - return m == NM_MATCH_SPEC_MATCH; + + switch (m) { + case NM_MATCH_SPEC_MATCH: + return TRUE; + case NM_MATCH_SPEC_NEG_MATCH: + return FALSE; + case NM_MATCH_SPEC_NO_MATCH: + return no_match_value; + } + nm_assert_not_reached (); + return no_match_value; } guint diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index e7d79947cc..171dfdc1c8 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -507,6 +507,7 @@ gboolean nm_device_check_slave_connection_compatible (NMDevice *device, NMConnec gboolean nm_device_unmanage_on_quit (NMDevice *self); gboolean nm_device_spec_match_list (NMDevice *device, const GSList *specs); +int nm_device_spec_match_list_full (NMDevice *self, const GSList *specs, int no_match_value); gboolean nm_device_is_activating (NMDevice *dev); gboolean nm_device_autoconnect_allowed (NMDevice *self);