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 7EAAC43B24; Fri, 16 Feb 2024 04:38:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60A7A42E3E; Fri, 16 Feb 2024 04:37:59 +0100 (CET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by mails.dpdk.org (Postfix) with ESMTP id E442E4027C for ; Fri, 16 Feb 2024 04:37:55 +0100 (CET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-1d8da50bffaso9410975ad.2 for ; Thu, 15 Feb 2024 19:37:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1708054675; x=1708659475; 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=EStD9EvR6OoecugU86AyTaCTLdlfFyksP+Y5mTQTQRU=; b=3gVmrKndDdiS1+EluE4rL5T+aVzNMpbkFPVrE78Ri6C0cg5WlcW3Eo8d8mkmh4Dv6x lmELkAvybHB7nBDNDy7gV9+Hoqjsci51N361ko3NIlgtNgDXHC5YI/coFtdDHTrBt3mZ F4kwWs/j5o7djOCcL5KizertJjXtWcbgSZwwo+GBRrZQAGiBYzUgnThTQRZHljoxtS0N /pVVRq2LVyME0uw238PEVavjx/GDPFtkpVCxUuroaOZfXiI1pYw4506YSDtAX2cO5vMv oAFEj19GfQ8npHnuokiqKWAB85UPaXB18eGV2PgoTb7bAILLY2RBDwWO5+8cnVsL/3dp 3Vhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708054675; x=1708659475; 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=EStD9EvR6OoecugU86AyTaCTLdlfFyksP+Y5mTQTQRU=; b=g/jsrP0kHv7TsQWFi5/cWXskRAhzWkfOM+FtLTfely0VsIA1RsAzhdMYQ2e+IeqDtp Lq1UkQs/Yzb1uBhET8n92SyrmnbjFghoUpO6mPH/qxlvc1eeTI7zHXiTgIpYVf45mAwj 7ytATNodrvm3X9z4A0tNkVMWYE72EpCSb97VDaCm9ISQoO4PXOaaNHa62QGgneq01C7J bUribFgtTlGT5MNywvMnaU4vkQwhXq9APuPOoCGYR4QddV+OhU3ZmL5qLW+snV9jNO+4 6gVR+UcKSgv7xRprsyLwsW9dVmsBK3H0daH0ug6ojjWg9ZXTK0oOKgaFSXVu6TmePJyU Ayqg== X-Gm-Message-State: AOJu0YwK0cFm/dEkNJ50eCzkO7qp2eUlGpFkXYbEP5vra0A/hSO9JN5p g1FVMdvtKduI16mW2o31MOxDVpLK4lAJZozZ97SZR/M3pKy1CORn43hpU97NZ++wi4sfnAdd1Vo r X-Google-Smtp-Source: AGHT+IHTG6rcS5a4GUBh4dlCliZ4XFoVu1dTUaXB/9IUggDTjJxsHKDkKz2q9pk7M8ED3kYNVLoMJw== X-Received: by 2002:a17:902:ce85:b0:1d9:c01a:dee6 with SMTP id f5-20020a170902ce8500b001d9c01adee6mr4786584plg.44.1708054675048; Thu, 15 Feb 2024 19:37:55 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id x9-20020a170902e04900b001db561fa164sm1967871plx.25.2024.02.15.19.37.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 19:37:54 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , David Hunt , Huisong Li , Anatoly Burakov , Sivaprasad Tummala Subject: [PATCH v2 2/3] examples/vm_power_manager: do not use EAL logtype Date: Thu, 15 Feb 2024 19:36:18 -0800 Message-ID: <20240216033743.150800-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240216033743.150800-1-stephen@networkplumber.org> References: <20231211172437.61958-1-stephen@networkplumber.org> <20240216033743.150800-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 b159291d77ce..c14138202004 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