diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-05-24 13:53:09 +0000 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2008-05-24 13:53:09 +0000 |
commit | 20f9ea7fb5ba3ea1129e0a4f3371a319c701dce5 (patch) | |
tree | 0d1405b5cd05e9229e18d3131d6f8dcaf626eb96 /hardinfo2/arch/linux/common/net.h | |
parent | ac1d892607eb0e94a3ee7c8b900aed62791df73c (diff) |
:)
Diffstat (limited to 'hardinfo2/arch/linux/common/net.h')
-rw-r--r-- | hardinfo2/arch/linux/common/net.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/hardinfo2/arch/linux/common/net.h b/hardinfo2/arch/linux/common/net.h index 06dc85ca..af621db8 100644 --- a/hardinfo2/arch/linux/common/net.h +++ b/hardinfo2/arch/linux/common/net.h @@ -243,10 +243,19 @@ static struct { { NULL, "Unknown", "network-generic" }, }; -static void net_get_iface_type(gchar * name, gchar ** type, gchar ** icon) +static void net_get_iface_type(gchar * name, gchar ** type, gchar ** icon, NetInfo *ni) { int i; +#ifdef HAS_LINUX_WE + if (ni->is_wireless) { + *type = "Wireless"; + *icon = "wireless"; + + return; + } +#endif + for (i = 0; netdev2type[i].type; i++) { if (g_str_has_prefix(name, netdev2type[i].type)) break; @@ -326,12 +335,6 @@ static void scan_net_interfaces_24(void) gdouble trans_mb = trans_bytes / 1048576.0; get_net_info(ifacename, &ni); -#ifdef HAS_LINUX_WE - if (ni.is_wireless) { - iface_type = "Wireless"; - iface_icon = "wireless"; - } -#endif devid = g_strdup_printf("NET%s", ifacename); @@ -343,7 +346,7 @@ static void scan_net_interfaces_24(void) ni.ip[0] ? ip : ""); g_free(ip); - net_get_iface_type(ifacename, &iface_type, &iface_icon); + net_get_iface_type(ifacename, &iface_type, &iface_icon, &ni); network_icons = h_strdup_cprintf("Icon$%s$%s=%s.png\n", network_icons, devid, |