On Sunday 04 April 2010 09:44:20 Sven Eckelmann wrote:
From: Luis de Bethencourt luisbg@ubuntu.com
This patch fixes the 31 unnecessary whitespaces before a quoted newline that the batman-adv files had.
Signed-off-by: Luis de Bethencourt luisbg@ubuntu.com [sven.eckelmann@gmx.de: Redone to apply against current version] Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Changes are done with "reorganized kernel interface patches (version 3)" applied.
--- a/batman-adv-kernelland/bat_sysfs.c +++ b/batman-adv-kernelland/bat_sysfs.c @@ -77,7 +77,7 @@ static ssize_t show_aggr_ogm(struct kobject *kobj, struct attribute *attr, struct bat_priv *bat_priv = netdev_priv(to_net_dev(dev)); int aggr_status = atomic_read(&bat_priv->aggregation_enabled);
return sprintf(buff, "status: %s\ncommands: enable, disable, 0, 1
\n", + return sprintf(buff, "status: %s\ncommands: enable, disable, 0, 1\n", aggr_status == 0 ? "disabled" : "enabled"); }
The whitespaces in bat_sysfs.c after the "commands" string are intentional. Userspace applications can simply split the string after each whitespace. Of course, it can be done differently but it only "costs" us a whitespace. I was not aware this would be an issue. Can we keep it or should we change e.g. batctl ?
Cheers, Marek