b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH v3 33/42] batctl: Move fragmentation setting to own file
Date: Thu, 25 Oct 2018 18:22:36 +0200	[thread overview]
Message-ID: <20181025162245.19389-34-sven@narfation.org> (raw)
In-Reply-To: <20181025162245.19389-1-sven@narfation.org>

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>
---
 Makefile        |  1 +
 fragmentation.c | 33 +++++++++++++++++++++++++++++++++
 sys.c           |  9 ---------
 3 files changed, 34 insertions(+), 9 deletions(-)
 create mode 100644 fragmentation.c

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/fragmentation.c b/fragmentation.c
new file mode 100644
index 0000000..e159bdd
--- /dev/null
+++ b/fragmentation.c
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (C) 2009-2018  B.A.T.M.A.N. contributors:
+ *
+ * Marek Lindner <mareklindner@neomailbox.ch>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA
+ *
+ * License-Filename: LICENSES/preferred/GPL-2.0
+ */
+
+#include "main.h"
+#include "sys.h"
+
+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");
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,
-- 
2.11.0


  parent reply	other threads:[~2018-10-25 16:22 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-25 16:22 [B.A.T.M.A.N.] [PATCH v3 00/42] batctl: pre-netlink restructuring, part 1 Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 01/42] batctl: Drop unused define SOCKET_PATH_FMT Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 02/42] batctl: Use common code organization for statistics Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 03/42] batctl: Drop legacy vis_* related warning messages Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 04/42] batctl: Move loglevel command to separate file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 05/42] batctl: Move log " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 06/42] batctl: Move gw_mode " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 07/42] batctl: Move routing_algo " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 08/42] batctl: Rename tp_meter to throughputmeter Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 09/42] batctl: Introduce datastructure for subcommands Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 10/42] batctl: Add per command flags Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 11/42] batctl: Use command structure for remaining subcommands Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 12/42] batctl: Use getopt to parse main options Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 13/42] batctl: Store usage line next to command Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 14/42] batctl: Prepare command infrastructure for shared functions Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 15/42] batctl: Add type to command to structure usage output Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 16/42] batctl: Convert debug table to command infrastructure Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 17/42] batctl: Convert sysfs settings " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 18/42] batctl: Move backbonetable debug table to own file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 19/42] batctl: Move claimtable " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 20/42] batctl: Move dat_cache " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 21/42] batctl: Move gateways " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 22/42] batctl: Move mcast_flags " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 23/42] batctl: Move nc_nodes " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 24/42] batctl: Move neighbors " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 25/42] batctl: Move originators " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 26/42] batctl: Move transglobal " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 27/42] batctl: Move translocal " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 28/42] batctl: Move aggregation setting " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 29/42] batctl: Move ap_isolation " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 30/42] batctl: Move bonding " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 31/42] batctl: Move bridge_loop_avoidance " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 32/42] batctl: Move distributed_arp_table " Sven Eckelmann
2018-10-25 16:22 ` Sven Eckelmann [this message]
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 34/42] batctl: Move isolation_mark " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 35/42] batctl: Move multicast_mode " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 36/42] batctl: Move network_coding " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 37/42] batctl: Move orig_interval " Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 38/42] batctl: Use external netlink socket for debug tables Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 39/42] batctl: Move routing_algo specific code it command source file Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 40/42] batctl: Add command to monitor for netlink events Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 41/42] batctl: Simplify enabling for bisect_iv subcommand Sven Eckelmann
2018-10-25 16:22 ` [B.A.T.M.A.N.] [PATCH v3 42/42] batctl: Allow to enable/disable subcommands Sven Eckelmann
2018-11-03 12:51 ` [B.A.T.M.A.N.] [PATCH v3 00/42] batctl: pre-netlink restructuring, part 1 Sven Eckelmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181025162245.19389-34-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).