From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 98763459D7;
	Thu, 19 Sep 2024 17:07:12 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 9380B43392;
	Thu, 19 Sep 2024 17:06:28 +0200 (CEST)
Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com
 [209.85.210.178])
 by mails.dpdk.org (Postfix) with ESMTP id EA5134337F
 for <dev@dpdk.org>; Thu, 19 Sep 2024 17:06:24 +0200 (CEST)
Received: by mail-pf1-f178.google.com with SMTP id
 d2e1a72fcca58-718d91eef2eso640751b3a.1
 for <dev@dpdk.org>; Thu, 19 Sep 2024 08:06:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1726758384;
 x=1727363184; darn=dpdk.org; 
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=o2d4foqEUlKX8e/d7INvNR8WQ2O85ZJBZV4qHltV3dM=;
 b=xxhNig7e/uABCKaff2Fu6mKMHl7ECsVwHrSpjhwZKp5X4pcMV2ziTDV8nLB4E08yih
 Jo3gBh9q9CSgMN2dxpjcgzfVOV+j2VnNpb8KixqlLBbyKO3zgL+yjiAh0QVfLUHL7kLk
 s/ByZEyvd5UbnYYgW/M/Li47CSEDks5HwGkezEIVNfT/ko6nhLhw81XLVFRQFi3bGjDY
 tVTzXV1E5OMfqeA39wYQlo4xrGv/Q4CoIX5BydRS+wl376tw9OZIPGeiXTX9oRrR7rJu
 HeT2/GgtH9X5oPfdeQIFv0KZOVuvuepg243w/xxSxz/ZRKuo/LfymxnA30PRshTY8RUG
 ObNg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1726758384; x=1727363184;
 h=content-transfer-encoding:mime-version:references:in-reply-to
 :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=o2d4foqEUlKX8e/d7INvNR8WQ2O85ZJBZV4qHltV3dM=;
 b=IqtYRuhCJYdiTCiVnsDCrtui0dascS6BB5Cb+DZRVmO7l7Ygtt8p86lffmFO19Qrs8
 gchOuwvNXtOO2eLpcJfq9V04n1HjQqCWiRiW7DCV1RhytN5IAXhlo9OrXGp+I1ir7jqk
 Eapf5gQ+UMxgdZmZNyY/PenEV7+FtI/SGwGPbyuym9j07S1Kl5fqTUyDgnupBDSmJgFq
 Fd2l7n/UcVeWk6chFldWk3eMAlntvVNjP6AMZYqRxPfLR1G7o1FYJA44tYJJZSKv1dVk
 N1eGuwSwtXswyvjl2TuGNEdlw8953cqoHOBQOSJw4RumDZBZSdgeYKt3SBEOtF3bH8Y8
 hKgQ==
X-Gm-Message-State: AOJu0YwJSkndf++biWOeAnFdoQdLO+B5QLS3yBDifLbSO5Id74eVM563
 rCL0vFX3qEQSv4UK1smWV3mtdGNwaGGMQz11kaC5n+0g930OYouTBXOgRqaOBUrOJKRxpfiYb8V
 o
X-Google-Smtp-Source: AGHT+IHJvOWXh84q3wEGqHqgqigHpDrmuONMFy1TmVsVlFyO0/A+r8dM4n3pr+QnYnx717jgNSppEw==
X-Received: by 2002:a05:6a00:1746:b0:70d:2a1b:422c with SMTP id
 d2e1a72fcca58-7198e2a8f1dmr5660731b3a.7.1726758384121; 
 Thu, 19 Sep 2024 08:06:24 -0700 (PDT)
Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-71944adfd3dsm8620841b3a.92.2024.09.19.08.06.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 19 Sep 2024 08:06:23 -0700 (PDT)
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Tyler Retzlaff <roretzla@linux.microsoft.com>,
 =?UTF-8?q?Morten=20Br=C3=B8rup?= <mb@smartsharesystems.com>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Chengwen Feng <fengchengwen@huawei.com>
Subject: [PATCH v25 06/15] eal: change rte_exit() output to match rte_log()
Date: Thu, 19 Sep 2024 08:04:12 -0700
Message-ID: <20240919150609.5281-7-stephen@networkplumber.org>
X-Mailer: git-send-email 2.45.2
In-Reply-To: <20240919150609.5281-1-stephen@networkplumber.org>
References: <20200814173441.23086-1-stephen@networkplumber.org>
 <20240919150609.5281-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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 <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
---
 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);
 }
-- 
2.45.2