Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 1203ba6d8920934134eac2fa0f133e25d47a79f5 Author: Sven Eckelmann sven@narfation.org Date: Thu Oct 25 18:22:32 2018 +0200
batctl: Move ap_isolation 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
1203ba6d8920934134eac2fa0f133e25d47a79f5 Makefile | 1 + aggregation.c => ap_isolation.c | 12 ++++++------ sys.c | 9 --------- 3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile index dfc59af..0a72595 100755 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ BINARY_NAME = batctl OBJ_BISECT = bisect_iv.o
OBJ += aggregation.o +OBJ += ap_isolation.o OBJ += bat-hosts.o OBJ += backbonetable.o ifeq ($(CONFIG_BATCTL_BISECT),y) diff --git a/aggregation.c b/ap_isolation.c similarity index 72% copy from aggregation.c copy to ap_isolation.c index 57c1dbb..2d16c68 100644 --- a/aggregation.c +++ b/ap_isolation.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright (C) 2009-2018 B.A.T.M.A.N. contributors: * - * Marek Lindner mareklindner@neomailbox.ch + * Antonio Quartulli a@unstable.cc * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -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_ap_isolation = { + .sysfs_name = "ap_isolation", .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, ap_isolation, "ap", handle_sys_setting, + COMMAND_FLAG_MESH_IFACE, &batctl_settings_ap_isolation, + "[0|1] \tdisplay or modify ap_isolation setting"); diff --git a/sys.c b/sys.c index 00e452c..80d9fa1 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_ap_isolation = { - .sysfs_name = "ap_isolation", - .params = sysfs_param_enable, -}; - -COMMAND_NAMED(SUBCOMMAND, ap_isolation, "ap", handle_sys_setting, - COMMAND_FLAG_MESH_IFACE, &batctl_settings_ap_isolation, - "[0|1] \tdisplay or modify ap_isolation setting"); - static struct settings_data batctl_settings_bridge_loop_avoidance = { .sysfs_name = SYS_BLA, .params = sysfs_param_enable,