From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Hall Subject: [PATCH 6/6] eal_log.c: limit syslog level to RTE_SYSLOG_LEVEL_MAX Date: Fri, 13 Nov 2015 06:47:38 +0000 Message-ID: <1447397258-27233-7-git-send-email-mhall@mhcomputing.net> References: <1447397258-27233-1-git-send-email-mhall@mhcomputing.net> To: dev@dpdk.org Return-path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id A58FC93B0 for ; Fri, 13 Nov 2015 07:48:01 +0100 (CET) In-Reply-To: <1447397258-27233-1-git-send-email-mhall@mhcomputing.net> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Signed-off-by: Matthew Hall --- lib/librte_eal/linuxapp/eal/eal_log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_log.c b/lib/librte_eal/linuxapp/eal/eal_log.c index 0b133c3..dbeff75 100644 --- a/lib/librte_eal/linuxapp/eal/eal_log.c +++ b/lib/librte_eal/linuxapp/eal/eal_log.c @@ -73,6 +73,7 @@ console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size) /* Syslog error levels are from 0 to 7, so subtract 1 to convert */ loglevel = rte_log_cur_msg_loglevel() - 1; + loglevel = loglevel > RTE_SYSLOG_LEVEL_MAX ? RTE_SYSLOG_LEVEL_MAX : loglevel; memcpy(copybuf, buf, size); copybuf[size] = '\0'; -- 1.9.1