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 E2989436D1; Tue, 12 Dec 2023 12:53:31 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD3D542E2B; Tue, 12 Dec 2023 12:53:31 +0100 (CET) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) by mails.dpdk.org (Postfix) with ESMTP id 3455E42E1A for ; Tue, 12 Dec 2023 12:53:30 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.44]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4SqH3P1plVz1FDlY; Tue, 12 Dec 2023 19:49:53 +0800 (CST) Received: from kwepemm000004.china.huawei.com (unknown [7.193.23.18]) by mail.maildlp.com (Postfix) with ESMTPS id 638DD1400CF; Tue, 12 Dec 2023 19:53:28 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 12 Dec 2023 19:53:27 +0800 Message-ID: Date: Tue, 12 Dec 2023 19:53:27 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 3/3] examples/vm_power_manager: do not use EAL logtype To: Stephen Hemminger , CC: Anatoly Burakov , David Hunt , Sivaprasad Tummala References: <20231211172437.61958-1-stephen@networkplumber.org> <20231211172437.61958-4-stephen@networkplumber.org> From: "lihuisong (C)" In-Reply-To: <20231211172437.61958-4-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm000004.china.huawei.com (7.193.23.18) 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: Huisong Li 在 2023/12/12 1:23, Stephen Hemminger 写道: > 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 > --- > 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; > } >