everything: use libgudev instead of HAL; merge NM and nm-system-settings
The only thing that doesn't work yet is the system-settings service's "auto eth" connections for ethernet devices that don't have an existing connection. Might also have issues with unmanaged devices that can't provide a MAC address until they are brought up, but we'll see.
This commit is contained in:
@@ -366,7 +366,7 @@ nm_utils_call_dispatcher (const char *action,
|
||||
|
||||
/* state */
|
||||
value_hash_add_uint (device_props, NMD_DEVICE_PROPS_STATE, nm_device_get_state (device));
|
||||
value_hash_add_object_path (device_props, NMD_DEVICE_PROPS_PATH, nm_device_get_udi (device));
|
||||
value_hash_add_object_path (device_props, NMD_DEVICE_PROPS_PATH, nm_device_get_path (device));
|
||||
}
|
||||
|
||||
dbus_g_proxy_call_no_reply (proxy, "Action",
|
||||
@@ -383,6 +383,32 @@ nm_utils_call_dispatcher (const char *action,
|
||||
g_object_unref (dbus_mgr);
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_match_spec_hwaddr (const GSList *specs, const char *hwaddr)
|
||||
{
|
||||
const GSList *iter;
|
||||
char *hwaddr_match, *p;
|
||||
|
||||
g_return_val_if_fail (hwaddr != NULL, FALSE);
|
||||
|
||||
p = hwaddr_match = g_strdup_printf ("mac:%s", hwaddr);
|
||||
|
||||
while (*p) {
|
||||
*p = g_ascii_tolower (*p);
|
||||
p++;
|
||||
}
|
||||
|
||||
for (iter = specs; iter; iter = g_slist_next (iter)) {
|
||||
if (!strcmp ((const char *) iter->data, hwaddr_match)) {
|
||||
g_free (hwaddr_match);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (hwaddr_match);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
|
||||
static void
|
||||
@@ -449,3 +475,4 @@ value_hash_add_uint (GHashTable *hash,
|
||||
|
||||
value_hash_add (hash, key, value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user