From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E32A3459CB; Thu, 19 Sep 2024 03:09:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB65942FF7; Thu, 19 Sep 2024 03:09:47 +0200 (CEST) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) by mails.dpdk.org (Postfix) with ESMTP id CACBD40156 for ; Thu, 19 Sep 2024 03:09:45 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4X8HVK6r6Zz20mdw; Thu, 19 Sep 2024 09:09:29 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 440CB14022F; Thu, 19 Sep 2024 09:09:44 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 19 Sep 2024 09:09:44 +0800 Message-ID: <6ee5e3e8-9ebc-41b8-af13-31d065acee8c@huawei.com> Date: Thu, 19 Sep 2024 09:09:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v24 06/15] eal: change rte_exit() output to match rte_log() To: Stephen Hemminger , CC: Tyler Retzlaff , =?UTF-8?Q?Morten_Br=C3=B8rup?= , Bruce Richardson References: <20200814173441.23086-1-stephen@networkplumber.org> <20240918205324.35449-1-stephen@networkplumber.org> <20240918205324.35449-7-stephen@networkplumber.org> Content-Language: en-US From: fengchengwen In-Reply-To: <20240918205324.35449-7-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Chengwen Feng On 2024/9/19 4:52, Stephen Hemminger wrote: > The rte_exit() output format confuses the timestamp and coloring > options. Change it to use be a single line with proper prefix. > > Before: > [ 0.006481] EAL: Error - exiting with code: 1 > Cause: [ 0.006489] Cannot init EAL: Permission denied > > After: > [ 0.006238] EAL: Error - exiting with code: 1 > [ 0.006250] EAL: Cannot init EAL: Permission denied > > Signed-off-by: Stephen Hemminger > Acked-by: Tyler Retzlaff > Acked-by: Morten Brørup > Acked-by: Bruce Richardson > --- > lib/eal/common/eal_common_debug.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/lib/eal/common/eal_common_debug.c b/lib/eal/common/eal_common_debug.c > index 3e77995896..bcfcd6df6f 100644 > --- a/lib/eal/common/eal_common_debug.c > +++ b/lib/eal/common/eal_common_debug.c > @@ -36,15 +36,13 @@ rte_exit(int exit_code, const char *format, ...) > va_list ap; > > if (exit_code != 0) > - RTE_LOG(CRIT, EAL, "Error - exiting with code: %d\n" > - " Cause: ", exit_code); > + EAL_LOG(CRIT, "Error - exiting with code: %d", exit_code); > > va_start(ap, format); > rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap); > va_end(ap); > > if (rte_eal_cleanup() != 0 && rte_errno != EALREADY) > - EAL_LOG(CRIT, > - "EAL could not release all resources"); > + EAL_LOG(CRIT, "EAL could not release all resources"); > exit(exit_code); > }