Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 0e3f1d1e3768160913127ed008ea6e1429537649 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 25 18:22:33 2018 +0200
batctl: Move bonding 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
0e3f1d1e3768160913127ed008ea6e1429537649 Makefile | 1 + aggregation.c => bonding.c | 10 +++++----- sys.c | 9 --------- 3 files changed, 6 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile index 0a72595..c1b8484 100755 --- a/Makefile +++ b/Makefile @@ -36,6 +36,7 @@ OBJ += backbonetable.o ifeq ($(CONFIG_BATCTL_BISECT),y) OBJ += $(OBJ_BISECT) endif +OBJ += bonding.o OBJ += claimtable.o OBJ += dat_cache.o OBJ += debugfs.o diff --git a/aggregation.c b/bonding.c similarity index 76% copy from aggregation.c copy to bonding.c index 57c1dbb..f7105c9 100644 --- a/aggregation.c +++ b/bonding.c @@ -23,11 +23,11 @@ #include "main.h" #include "sys.h"
-static struct settings_data batctl_settings_aggregation = { - .sysfs_name = "aggregated_ogms", +static struct settings_data batctl_settings_bonding = { + .sysfs_name = "bonding", .params = sysfs_param_enable, };
-COMMAND_NAMED(SUBCOMMAND, aggregation, "ag", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_aggregation, - "[0|1] \tdisplay or modify aggregation setting"); +COMMAND_NAMED(SUBCOMMAND, bonding, "b", handle_sys_setting, + COMMAND_FLAG_MESH_IFACE, &batctl_settings_bonding, + "[0|1] \tdisplay or modify bonding setting"); diff --git a/sys.c b/sys.c index 80d9fa1..8ad925e 100644 --- a/sys.c +++ b/sys.c @@ -164,15 +164,6 @@ COMMAND_NAMED(SUBCOMMAND, distributed_arp_table, "dat", handle_sys_setting, COMMAND_FLAG_MESH_IFACE, &batctl_settings_distributed_arp_table, "[0|1] \tdisplay or modify distributed_arp_table setting");
-static struct settings_data batctl_settings_bonding = { - .sysfs_name = "bonding", - .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"); - static struct settings_data batctl_settings_fragmentation = { .sysfs_name = "fragmentation", .params = sysfs_param_enable,