From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 149E5567F for ; Tue, 18 Apr 2017 16:22:26 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id EA5C62A365; Tue, 18 Apr 2017 16:22:14 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org Cc: ferruh.yigit@intel.com, jianfeng.tan@intel.com, thomas@monjalon.net Date: Tue, 18 Apr 2017 16:22:25 +0200 Message-Id: <20170418142225.6308-6-olivier.matz@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170418142225.6308-1-olivier.matz@6wind.com> References: <20170418142225.6308-1-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 6/6] eal: fix dump of registered logs when disabled X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 14:22:26 -0000 When we pass --log-level=0, it disables the logs. This level is not displayed properly by the function that dumps the registered log types (it shows "unknown"). Show "disabled" instead. Before: ./build/app/test --log-level=0 RTE>>dump_log_types global log level is unknown ... After: ./build/app/test --log-level=0 RTE>>dump_log_types global log level is disabled ... Fixes: 432050bfd05b ("eal: dump registered log types") Signed-off-by: Olivier Matz --- lib/librte_eal/common/eal_common_log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c index c2957d167..164078c74 100644 --- a/lib/librte_eal/common/eal_common_log.c +++ b/lib/librte_eal/common/eal_common_log.c @@ -294,6 +294,7 @@ static const char * loglevel_to_string(uint32_t level) { switch (level) { + case 0: return "disabled"; case RTE_LOG_EMERG: return "emerg"; case RTE_LOG_ALERT: return "alert"; case RTE_LOG_CRIT: return "critical"; -- 2.11.0