From a49f20142a5fb2a2dab23bb81195175ac4a48de6 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Tue, 11 Aug 2009 13:24:04 +0200 Subject: [PATCH] =?utf8?q?madwifi=20plugin:=20Rename=20the=20=E2=80=98Disa?= =?utf8?q?bleSysfs=E2=80=99=20to=20=E2=80=98Source=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Configurations like DisableSysfs false are confusing. --- src/madwifi.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/madwifi.c b/src/madwifi.c index 478341ea..364dcbd7 100644 --- a/src/madwifi.c +++ b/src/madwifi.c @@ -78,13 +78,13 @@ * * * By default, madwifi plugin enumerates network interfaces using /sys - * filesystem. Configuration option DisableSysfs can change this to use + * filesystem. Configuration option `Source' can change this to use * /proc filesystem (which is useful for example when running on Linux * 2.4). But without /sys filesystem, Madwifi plugin cannot check whether * given interface is madwifi interface and there are private ioctls used, * which may do something completely different on non-madwifi devices. - * Therefore, option DisableSysfs should be used together with option - * Interface, to limit found interfaces to madwifi interfaces only. + * Therefore, the /proc filesystem should always be used together with option + * `Interface', to limit found interfaces to madwifi interfaces only. **/ @@ -350,7 +350,7 @@ static const char *config_keys[] = { "Interface", "IgnoreSelected", - "DisableSysfs", + "Source", "WatchAdd", "WatchRemove", "WatchSet", @@ -461,8 +461,20 @@ static int madwifi_config (const char *key, const char *value) else if (strcasecmp (key, "IgnoreSelected") == 0) ignorelist_set_invert (ignorelist, ! bool_arg(value)); - else if (strcasecmp (key, "DisableSysfs") == 0) - use_sysfs = ! bool_arg(value); + else if (strcasecmp (key, "Source") == 0) + { + if (strcasecmp (value, "ProcFS") == 0) + use_sysfs = 0; + else if (strcasecmp (value, "SysFS") == 0) + use_sysfs = 1; + else + { + ERROR ("madwifi plugin: The argument of the `Source' " + "option must either be `SysFS' or " + "`ProcFS'."); + return -1; + } + } else if (strcasecmp (key, "WatchSet") == 0) { -- 2.11.0