core: remove nm_match_spec_string()
It was only used to match against "*", in a case-insensitive way.
This commit is contained in:
@@ -864,19 +864,6 @@ nm_utils_find_helper(const char *progname, const char *try_first, GError **error
|
||||
|
||||
/******************************************************************************************/
|
||||
|
||||
gboolean
|
||||
nm_match_spec_string (const GSList *specs, const char *match)
|
||||
{
|
||||
const GSList *iter;
|
||||
|
||||
for (iter = specs; iter; iter = g_slist_next (iter)) {
|
||||
if (!g_ascii_strcasecmp ((const char *) iter->data, match))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define MAC_TAG "mac:"
|
||||
#define INTERFACE_NAME_TAG "interface-name:"
|
||||
#define SUBCHAN_TAG "s390-subchannels:"
|
||||
|
@@ -96,7 +96,6 @@ const char *nm_utils_find_helper (const char *progname,
|
||||
const char *try_first,
|
||||
GError **error);
|
||||
|
||||
gboolean nm_match_spec_string (const GSList *specs, const char *string);
|
||||
gboolean nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr);
|
||||
gboolean nm_match_spec_s390_subchannels (const GSList *specs, const char *subchannels);
|
||||
gboolean nm_match_spec_interface_name (const GSList *specs, const char *interface_name);
|
||||
|
@@ -8088,9 +8088,12 @@ spec_match_list (NMDevice *self, const GSList *specs)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
|
||||
gboolean matched = FALSE;
|
||||
const GSList *iter;
|
||||
|
||||
if (nm_match_spec_string (specs, "*"))
|
||||
for (iter = specs; iter; iter = g_slist_next (iter)) {
|
||||
if (!strcmp ((const char *) iter->data, "*"))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (priv->hw_addr_len)
|
||||
matched = nm_match_spec_hwaddr (specs, priv->hw_addr);
|
||||
|
Reference in New Issue
Block a user