summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael+x200@stapelberg.de>2008-10-24 21:05:12 +0200
committerMichael Stapelberg <michael+x200@stapelberg.de>2008-10-24 21:05:20 +0200
commit62f3fc6838bf0e59bb490b0da229649bf86d847c (patch)
tree5ddd40aa8bf1abac9fd4f1d2627cb21b1c01e413 /config.c
parent753144d58b5b7edb104f78b0c0331ad150fcdb7c (diff)
Implement getting current speed from network interfaces
The network interface must be supported by ethtool, as its syscall is used for this. This is at least the case for e1000 cards. Unfortunately, getting the speed needs root privileges. Therefore, you have to enable it in configuration separately.
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/config.c b/config.c
index e8c95dc..1b6fbec 100644
--- a/config.c
+++ b/config.c
@@ -19,6 +19,7 @@ const char *wmii_path;
const char *time_format;
const char *battery_path;
bool use_colors;
+bool get_ethspeed;
const char *wmii_normcolors = "#222222 #333333";
char order[MAX_ORDER][2];
const char **run_watches;
@@ -161,6 +162,10 @@ int load_configuration(const char *configfile) {
{
use_colors = true;
}
+ OPT("get_ethspeed")
+ {
+ get_ethspeed = true;
+ }
OPT("normcolors")
{
wmii_normcolors = strdup(dest_value);