core: kill nm_print_device_capabilities()
This commit is contained in:
@@ -96,38 +96,6 @@ nm_spawn_process (const char *args)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nm_print_device_capabilities (NMDevice *dev)
|
|
||||||
{
|
|
||||||
gboolean full_support = TRUE;
|
|
||||||
guint32 caps;
|
|
||||||
const char *driver, *iface;
|
|
||||||
|
|
||||||
g_return_if_fail (dev != NULL);
|
|
||||||
|
|
||||||
caps = nm_device_get_capabilities (dev);
|
|
||||||
iface = nm_device_get_iface (dev);
|
|
||||||
driver = nm_device_get_driver (dev);
|
|
||||||
if (!driver)
|
|
||||||
driver = "<unknown>";
|
|
||||||
|
|
||||||
if (caps == NM_DEVICE_CAP_NONE || !(NM_DEVICE_CAP_NM_SUPPORTED)) {
|
|
||||||
nm_info ("(%s): driver '%s' is unsupported", iface, driver);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (NM_IS_DEVICE_ETHERNET (dev)) {
|
|
||||||
if (!(caps & NM_DEVICE_CAP_CARRIER_DETECT)) {
|
|
||||||
nm_info ("(%s): driver '%s' does not support carrier detection.\n"
|
|
||||||
"\tYou must switch to it manually.",
|
|
||||||
iface, driver);
|
|
||||||
full_support = FALSE;
|
|
||||||
}
|
|
||||||
} else if (NM_IS_DEVICE_WIFI (dev)) {
|
|
||||||
/* Print out WPA support */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* nm_utils_ip4_netmask_to_prefix
|
* nm_utils_ip4_netmask_to_prefix
|
||||||
*
|
*
|
||||||
|
@@ -35,8 +35,6 @@ gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
|
|||||||
|
|
||||||
int nm_spawn_process (const char *args);
|
int nm_spawn_process (const char *args);
|
||||||
|
|
||||||
void nm_print_device_capabilities (NMDevice *dev);
|
|
||||||
|
|
||||||
char *nm_ether_ntop (const struct ether_addr *mac);
|
char *nm_ether_ntop (const struct ether_addr *mac);
|
||||||
|
|
||||||
void nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting);
|
void nm_utils_merge_ip4_config (NMIP4Config *ip4_config, NMSettingIP4Config *setting);
|
||||||
|
@@ -313,6 +313,10 @@ constructor (GType type,
|
|||||||
|
|
||||||
g_object_unref (monitor);
|
g_object_unref (monitor);
|
||||||
} else {
|
} else {
|
||||||
|
nm_info ("(%s): driver '%s' does not support carrier detection.",
|
||||||
|
nm_device_get_iface (NM_DEVICE (object)),
|
||||||
|
nm_device_get_driver (NM_DEVICE (object)));
|
||||||
|
|
||||||
priv->link_connected_id = 0;
|
priv->link_connected_id = 0;
|
||||||
priv->link_disconnected_id = 0;
|
priv->link_disconnected_id = 0;
|
||||||
priv->carrier = TRUE;
|
priv->carrier = TRUE;
|
||||||
|
@@ -181,8 +181,6 @@ constructor (GType type,
|
|||||||
if (NM_DEVICE_GET_CLASS (dev)->update_hw_address)
|
if (NM_DEVICE_GET_CLASS (dev)->update_hw_address)
|
||||||
NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev);
|
NM_DEVICE_GET_CLASS (dev)->update_hw_address (dev);
|
||||||
|
|
||||||
nm_print_device_capabilities (dev);
|
|
||||||
|
|
||||||
priv->initialized = TRUE;
|
priv->initialized = TRUE;
|
||||||
return object;
|
return object;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user