Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 3814f65ba04aa9a893eb85f50ca9cc415b1aca87 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 25 18:22:36 2018 +0200
batctl: Move fragmentation setting to own file
The sysfs settings are planned to get also be implemented in netlink. To avoid cluttering up netlink.c again, it should be stored in a separate file. This also allows to order the usage lines using the Makefile.
Signed-off-by: Sven Eckelmann sven@narfation.org
3814f65ba04aa9a893eb85f50ca9cc415b1aca87 Makefile | 1 + bonding.c => fragmentation.c | 10 +++++----- sys.c | 9 --------- 3 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile index 9cbef82..7f82d44 100755 --- a/Makefile +++ b/Makefile @@ -43,6 +43,7 @@ OBJ += dat_cache.o OBJ += debugfs.o OBJ += debug.o OBJ += distributed_arp_table.o +OBJ += fragmentation.o OBJ += functions.o OBJ += gateways.o OBJ += genl.o diff --git a/bonding.c b/fragmentation.c similarity index 75% copy from bonding.c copy to fragmentation.c index f7105c9..e159bdd 100644 --- a/bonding.c +++ b/fragmentation.c @@ -23,11 +23,11 @@ #include "main.h" #include "sys.h"
-static struct settings_data batctl_settings_bonding = { - .sysfs_name = "bonding", +static struct settings_data batctl_settings_fragmentation = { + .sysfs_name = "fragmentation", .params = sysfs_param_enable, };
-COMMAND_NAMED(SUBCOMMAND, bonding, "b", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_bonding, - "[0|1] \tdisplay or modify bonding setting"); +COMMAND_NAMED(SUBCOMMAND, fragmentation, "f", handle_sys_setting, + COMMAND_FLAG_MESH_IFACE, &batctl_settings_fragmentation, + "[0|1] \tdisplay or modify fragmentation setting"); diff --git a/sys.c b/sys.c index 9ce7a90..f81298b 100644 --- a/sys.c +++ b/sys.c @@ -146,15 +146,6 @@ COMMAND_NAMED(SUBCOMMAND, orig_interval, "it", handle_sys_setting, COMMAND_FLAG_MESH_IFACE, &batctl_settings_orig_interval, "[interval] \tdisplay or modify orig_interval setting");
-static struct settings_data batctl_settings_fragmentation = { - .sysfs_name = "fragmentation", - .params = sysfs_param_enable, -}; - -COMMAND_NAMED(SUBCOMMAND, fragmentation, "f", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_fragmentation, - "[0|1] \tdisplay or modify fragmentation setting"); - static struct settings_data batctl_settings_network_coding = { .sysfs_name = SYS_NETWORK_CODING, .params = sysfs_param_enable,