aboutsummaryrefslogtreecommitdiff
path: root/src/first_network_device.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-04Remove overly aggressive #errorJasper Lievisse Adriaanse1-4/+1
Change-Id: I8c20606d386d713cac51b620d1fcdb479a3622fe
2017-04-13Added bracesFabian Franzen1-1/+2
Added braces to the if-statement as requested.
2017-04-12Fix memory leak/Use BEGINS_WITH macroFabian Franzen1-5/+5
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-12Add check for virtual ethernet devicesFabian Franzen1-0/+18
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-02-07Plug an fd leak in the OpenBSD-specific code for _first_Jasper Lievisse Adriaanse1-5/+8
2017-01-31Make first_eth_interface() work on OpenBSD: (#197)Jasper Lievisse Adriaanse1-1/+63
- use a define for loopback interface device - use an approach similar to ifconfig(8) for determining device type
2016-08-22Parse uevent file to detect network device type (#153)Cihangir Akturk1-6/+51
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>
2015-11-24fix compilation on FreeBSDMichael Stapelberg1-0/+1
fixes #83
2015-11-16first_eth_interface: ignore MAC addresses, look for IPv4/IPv6 addressesMichael Stapelberg1-0/+7
2015-03-16clang-format-3.5 -i **/*.[ch], update modelineMichael Stapelberg1-27/+26
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.
2014-12-07support the special interface name _first_ for ethernet/wirelessMichael Stapelberg1-0/+39
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).