aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCihangir Akturk2016-08-22 20:23:59 +0300
committerMichael Stapelberg2016-08-22 10:23:59 -0700
commit15de209cbaee6827f061e8d2788c9db232012c6b (patch)
treedf2388c145bb6fe0ee7433940570c048839fb6dc /include
parentprint_wireless_info: fix FTBFS on hurd and kfreebsd (diff)
Parse uevent file to detect network device type (#153)
Currently i3status differentiates wireless and wired devices based on the existence of wireless directory inside the device's sysfs directory. This approach seems to cause 3g modems to be incorrectly identified as the first ethernet device. This commit solves this problem by using DEVTYPE variable from uevent file. Signed-off-by: Cihangir Akturk <cakturk@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/i3status.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/i3status.h b/include/i3status.h
index b4cf83f..4d2d0f1 100644
--- a/include/i3status.h
+++ b/include/i3status.h
@@ -202,7 +202,8 @@ void set_timezone(const char *tz);
/* src/first_network_device.c */
typedef enum {
NET_TYPE_WIRELESS = 0,
- NET_TYPE_ETHERNET = 1
+ NET_TYPE_ETHERNET = 1,
+ NET_TYPE_OTHER = 2
} net_type_t;
const char *first_eth_interface(const net_type_t type);