Commit Graph

16 Commits

Author SHA1 Message Date
Robert Nagy 0843d0c5b2
avoid linking an undefined function, sysfs is linux only (#474) 2021-12-15 13:33:09 +01:00
Michael Stapelberg a57cdc84e2
Switch to autotools (#316) 2019-01-23 08:56:40 +01:00
Antonio Huete Jimenez afd7e44d97 Detect interface type on DragonFly BSD 2018-07-15 21:59:18 +00:00
Ingo Bürk 4345fa9d97
Merge branch 'master' into master 2018-03-27 09:26:55 +02:00
Gerome Fournier 9212ee658b Make iface_type() work on FreeBSD 2018-02-07 11:26:34 +01:00
Jasper Lievisse Adriaanse 83d0b621c0 Remove overly aggressive #error
Change-Id: I8c20606d386d713cac51b620d1fcdb479a3622fe
2017-09-04 13:30:21 +02:00
Fabian Franzen 6a19709e65 Added braces
Added braces to the if-statement as requested.
2017-04-13 12:51:29 +02:00
Fabian Franzen ad3fac03c3 Fix memory leak/Use BEGINS_WITH macro
The orignal proposed code had a memory leak when returning true.
Furthermore I included the handy BEGINS_WITH macro of i3 which makes the
code (IMHO) a lot more readable.
2017-04-12 13:11:34 +02:00
Fabian Franzen f45581f8d8 Add check for virtual ethernet devices
The _first_ option for ethernet devices now uses the link in sysfs to determine
if it's a real device or just a virtual one (i.e veth** devices created by docker).
2017-04-12 03:46:04 +02:00
Jasper Lievisse Adriaanse 3c6d5ac3d7 Plug an fd leak in the OpenBSD-specific code for _first_ 2017-02-07 19:29:01 +01:00
Jasper Lievisse Adriaanse e09186fa19 Make first_eth_interface() work on OpenBSD: (#197)
- use a define for loopback interface device
- use an approach similar to ifconfig(8) for determining device type
2017-01-31 23:28:38 -08:00
Cihangir Akturk 15de209cba 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>
2016-08-22 10:23:59 -07:00
Michael Stapelberg 876c1cef8d fix compilation on FreeBSD
fixes #83
2015-11-24 19:26:07 +01:00
Michael Stapelberg 3e14e6e5f3 first_eth_interface: ignore MAC addresses, look for IPv4/IPv6 addresses 2015-11-16 22:41:18 +01:00
Michael Stapelberg d74e904bf4 clang-format-3.5 -i **/*.[ch], update modeline
From here on, we’ll use clang-format to automatically format the source.

This has worked well in i3, so we are introducing it for i3status.
2015-03-16 10:01:07 +01:00
Michael Stapelberg b219f47f39 support the special interface name _first_ for ethernet/wireless
Since we have deterministic device names in Linux, these strings are a
much better default in the i3status config than "eth0" and "wlan0" (what
we used before).
2014-12-07 15:17:31 +01:00