batctl: Rename option_watch_interval to option_timeout_interval

Message ID 20181207205013.25105-1-sven@narfation.org (mailing list archive)
State Accepted, archived
Commit 13e32a21de003d40a1607b9838a9d6c1d7cbf73c
Delegated to: Simon Wunderlich
Headers
Series batctl: Rename option_watch_interval to option_timeout_interval |

Commit Message

Sven Eckelmann Dec. 7, 2018, 8:50 p.m. UTC
  The watch interval is actually a different option for debug tables which
uses the parameter '-w'. The configuration to enable/disable the parameter
to set the timeout for not displaying not seen originators should therefore
use a different name.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
 debug.c       | 4 ++--
 debug.h       | 2 +-
 originators.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
  

Patch

diff --git a/debug.c b/debug.c
index 316312f..182877a 100644
--- a/debug.c
+++ b/debug.c
@@ -44,7 +44,7 @@  static void debug_table_usage(struct state *state)
 	fprintf(stderr, " \t -H don't show the header\n");
 	fprintf(stderr, " \t -w [interval] watch mode - refresh the table continuously\n");
 
-	if (debug_table->option_watch_interval)
+	if (debug_table->option_timeout_interval)
 		fprintf(stderr, " \t -t timeout interval - don't print originators not seen for x.y seconds \n");
 
 	if (debug_table->option_orig_iface)
@@ -89,7 +89,7 @@  int handle_debug_table(struct state *state, int argc, char **argv)
 			}
 			break;
 		case 't':
-			if (!debug_table->option_watch_interval) {
+			if (!debug_table->option_timeout_interval) {
 				fprintf(stderr, "Error - unrecognised option '-%c'\n", optchar);
 				debug_table_usage(state);
 				return EXIT_FAILURE;
diff --git a/debug.h b/debug.h
index 2dac1b7..f1a3fd4 100644
--- a/debug.h
+++ b/debug.h
@@ -43,7 +43,7 @@  struct debug_table_data {
 			 float orig_timeout, float watch_interval);
 	unsigned int option_unicast_only:1;
 	unsigned int option_multicast_only:1;
-	unsigned int option_watch_interval:1;
+	unsigned int option_timeout_interval:1;
 	unsigned int option_orig_iface:1;
 };
 
diff --git a/originators.c b/originators.c
index c29300a..7dc9b4c 100644
--- a/originators.c
+++ b/originators.c
@@ -219,7 +219,7 @@  static struct debug_table_data batctl_debug_table_originators = {
 	.debugfs_name = "originators",
 	.header_lines = 2,
 	.netlink_fn = netlink_print_originators,
-	.option_watch_interval = 1,
+	.option_timeout_interval = 1,
 	.option_orig_iface = 1,
 };