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 3543345563; Wed, 3 Jul 2024 18:29:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A2E242E8B; Wed, 3 Jul 2024 18:29:45 +0200 (CEST) Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) by mails.dpdk.org (Postfix) with ESMTP id 3383C42E7A for ; Wed, 3 Jul 2024 18:29:43 +0200 (CEST) Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-75c5bdab7faso315173a12.1 for ; Wed, 03 Jul 2024 09:29:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1720024182; x=1720628982; 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=nNSXjuAIAuOZSdJcKf9mqKnkjxwByojVOaFmSdQwSVI=; b=p7zhX6BBQPx6IxA6RZkM/gB+rxT4+YCVRo2PoIBvqbrcTVyENNNisRoL+A5rzHErDI 19z3mZvBE7wk+z0fS3vIYh/1xb7JjNGBP50bde0hWBtgEvGypFsIBLoeZT6wrDMQeB/F FykOeTJxo5a5asfkPKU9x/jYDiWFu1StmdHj1YBqqqac7L6Eu3wKYt7SJUpn0553GsjF MBO1Bsk63qB2Qu3vBNh9UInpzRccmMR6cROBEF+4xkvuKplObLSKqTmhk4a82bfJkaHa b7ZlS+OZbxRXVS1tEaGNKxqRVhh7yGon5j4nuq2i9DH+OIK11RzJm04hHag46aY1Oo/W S7zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720024182; x=1720628982; 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=nNSXjuAIAuOZSdJcKf9mqKnkjxwByojVOaFmSdQwSVI=; b=g8Sq7iaVRJ1L0CUkbCBMHxjxGN6fYH9TZDNU4zWwKlSQNq4Nu2RK2e8khCBMchen1K IEIrWGYdNfOvFYlpi6yuy324F/a20vVYGmQATV+CNe+10wNTFZonXWxj8L7Fo/tJsVUG qxAQilOML5Cl9cwa3GIKPzNcXZoixU4PfgTef91Tc24XWonphJksjjJIMHi4dd66UVo+ H9I6N7yFfF7Lg0jj9Jif5ePmxOCSE1fUPIo4GHPF0iCIfi2nMwMZHNbFQcSCSB9j8WHo 9r2HslxZ87JLfv2TthLPhSPiNkfd3g9WklCACII2lluHd5FSud4NbAatO3Kkjh0kuxme J1SA== X-Gm-Message-State: AOJu0YyZrExM1UGvAzciOQ5AXJUTjfbSwp2G8VH8UTWwxmo96Jn+qHB2 v+hOUaNG9fmUyVRPOG5aEHVmB7BgROo8bNtG4ttVX5q7Ajw5jSVNiDYFASy8M7fBEW4ECWegZOz /pBA= X-Google-Smtp-Source: AGHT+IEQ9RrQiyNPk1vaVRpxSaXyGPv+QNZ/9lV2ko9/D5IrEGi9YM6PoLCPUUk2t2bYH42kI4whpA== X-Received: by 2002:a05:6a20:734c:b0:1bd:2782:3cda with SMTP id adf61e73a8af0-1bef61999b7mr14337280637.35.1720024182231; Wed, 03 Jul 2024 09:29:42 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac1578a3bsm105534885ad.233.2024.07.03.09.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 09:29:41 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt , Huisong Li , Anatoly Burakov , Sivaprasad Tummala Subject: [PATCH v5 2/3] examples/vm_power_manager: do not use EAL logtype Date: Wed, 3 Jul 2024 09:28:20 -0700 Message-ID: <20240703162929.78438-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240703162929.78438-1-stephen@networkplumber.org> References: <20231211172437.61958-1-stephen@networkplumber.org> <20240703162929.78438-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Be consistent for all the error printouts and use fprintf(). The EAL logtype is reserved for internal use by EAL. Signed-off-by: Stephen Hemminger Acked-by: David Hunt Acked-by: Huisong Li --- examples/vm_power_manager/main.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index b159291d77..c141382020 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -425,8 +424,7 @@ main(int argc, char **argv) lcore_id = rte_get_next_lcore(-1, 1, 0); if (lcore_id == RTE_MAX_LCORE) { - RTE_LOG(ERR, EAL, "A minimum of three cores are required to run " - "application\n"); + fprintf(stderr, "A minimum of three cores are required to run application\n"); return 0; } printf("Running channel monitor on lcore id %d\n", lcore_id); @@ -434,16 +432,15 @@ main(int argc, char **argv) lcore_id = rte_get_next_lcore(lcore_id, 1, 0); if (lcore_id == RTE_MAX_LCORE) { - RTE_LOG(ERR, EAL, "A minimum of three cores are required to run " - "application\n"); + fprintf(stderr, "A minimum of three cores are required to run application\n"); return 0; } if (power_manager_init() < 0) { - printf("Unable to initialize power manager\n"); + fprintf(stderr, "Unable to initialize power manager\n"); return -1; } if (channel_manager_init(CHANNEL_MGR_DEFAULT_HV_PATH) < 0) { - printf("Unable to initialize channel manager\n"); + fprintf(stderr, "Unable to initialize channel manager\n"); return -1; } -- 2.43.0