batctl: correct batctl ll output

Message ID 1321185026-11095-1-git-send-email-ordex@autistici.org (mailing list archive)
State Accepted, archived
Commit 631d566dab8c0e1b9fc8baa8f12b69ee90da50a3
Headers

Commit Message

Antonio Quartulli Nov. 13, 2011, 11:50 a.m. UTC
  Since batctl has moved to a human-readable loglevel name, either 'batctl ll'
output should be coherent to this change. This patch correct it by substituting
the old numbers with the human-readable strings

Signed-off-by: Antonio Quartull <ordex@autistici.org>
---
 sys.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
  

Comments

Marek Lindner Nov. 13, 2011, 6:45 p.m. UTC | #1
On Sunday, November 13, 2011 19:50:26 Antonio Quartull wrote:
> Since batctl has moved to a human-readable loglevel name, either 'batctl
> ll' output should be coherent to this change. This patch correct it by
> substituting the old numbers with the human-readable strings

Applied in revision 631d566.

Thanks,
Marek
  

Patch

diff --git a/sys.c b/sys.c
index bddaaa3..e510bee 100644
--- a/sys.c
+++ b/sys.c
@@ -237,14 +237,15 @@  int handle_loglevel(char *mesh_iface, int argc, char **argv)
 
 	log_level = strtol(line_ptr, (char **) NULL, 10);
 
-	printf("[%c] %s (%d)\n", (!log_level) ? 'x' : ' ',
-	       "all debug output disabled", 0);
-	printf("[%c] %s (%d)\n", (log_level & 1) ? 'x' : ' ',
-	       "messages related to routing / flooding / broadcasting", 1);
-	printf("[%c] %s (%d)\n", (log_level & 2) ? 'x' : ' ',
-	       "messages related to route added / changed / deleted", 2);
-	printf("[%c] %s (%d)\n", (log_level & 4) ? 'x' : ' ',
-	       "messages related to translation table operations", 4);
+	printf("[%c] %s (%s)\n", (!log_level) ? 'x' : ' ',
+	       "all debug output disabled", "none");
+	printf("[%c] %s (%s)\n", (log_level & 1) ? 'x' : ' ',
+	       "messages related to routing / flooding / broadcasting",
+	       "batman");
+	printf("[%c] %s (%s)\n", (log_level & 2) ? 'x' : ' ',
+	       "messages related to route added / changed / deleted", "routes");
+	printf("[%c] %s (%s)\n", (log_level & 4) ? 'x' : ' ',
+	       "messages related to translation table operations", "tt");
 
 out:
 	if (errno == ENOENT)