From patchwork Sun Nov 13 11:50:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1334 Return-Path: Received: from contumacia.investici.org (contumacia.investici.org [178.255.144.35]) by open-mesh.org (Postfix) with ESMTPS id 1443D60069F for ; Sun, 13 Nov 2011 12:50:39 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@autistici.org; dkim-adsp=pass Received: from [178.255.144.35] (contumacia [178.255.144.35]) (Authenticated sender: ordex@autistici.org) by localhost (Postfix) with ESMTPSA id 1699DE847E; Sun, 13 Nov 2011 11:50:37 +0000 (UTC) X-DKIM: Sendmail DKIM Filter v2.8.2 contumacia.investici.org 1699DE847E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1321185038; bh=0ZENeDt9R1MNtQhavkcytJ0/LYWuxoo+rVXuBfe+nkg=; h=From:To:Cc:Subject:Date:Message-Id; b=fNlPY8+SBcFWx2OZ8OCJTS2WvKFTAWNHXKlHuA9/2P9o+uKWlG7vq+SVoyoChLXLm qLpWMegdrPxJXvnm7ea60WPWbP8bglgLTcMa3aDfTDHMqBluRjuqeyCaa4k4pP8Ln6 +/cSyUwx13yVy6my1LFle8lm8mUTprcAGKzAsHzE= From: Antonio Quartull To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 13 Nov 2011 12:50:26 +0100 Message-Id: <1321185026-11095-1-git-send-email-ordex@autistici.org> X-Mailer: git-send-email 1.7.3.4 Subject: [B.A.T.M.A.N.] [PATCH] batctl: correct batctl ll output X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Nov 2011 11:50:39 -0000 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 --- sys.c | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) 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)