From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by dpdk.org (Postfix) with ESMTP id 523C91B449 for ; Wed, 11 Jul 2018 23:45:39 +0200 (CEST) Received: by mail-wr1-f47.google.com with SMTP id q10-v6so19598502wrd.4 for ; Wed, 11 Jul 2018 14:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f9Tx+0UBVVYcjuKzsP9/IY1BZDwZjaAiADmqd7Cyj28=; b=mSp3v2/5shBi081Kh/mAi38AYNKDjtQWo9KWxuBb1ie8IYpzTIY/D+lzXMwtNImqud 5qBo6sge6nYO3LcjZEdfqKQpYU5hl9Wz64MkY2hhQI/UMcT9HLx0TdfXvSXNt39xluff lvBUMKulcEh9wTC0HMT5NT6eH52m8WxX8n3mCVkoFXzoB43/Koe55ic+o6qZNhxFtFBw +y0pnfxuQreo25vqDeklLDdtoXzclyfA1MqpC2iuiKX9vVk/dQQ/NcKhrngJg15fFcIR c1Lj+wGWr7bC4fHZwIowNiuixMtbQP9EMssC7dAHAD8kGhr8FMWQdQcxLmopSQbT5fsZ X/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f9Tx+0UBVVYcjuKzsP9/IY1BZDwZjaAiADmqd7Cyj28=; b=avpNfVAs6CH3yhj+i6WuyLysaAIEVOpIMZ67Kb5rXnYE0+IMb/6EkCvmPFHaYMNSSQ FLSdX0poY5DMZ9IgAoGA0t+Px1T526jFoSNlqLyUONGAJ/sk8/hlTxUfVUz+w9oJs2Qi gOT/wnxBb4E3REKueJM0XcPR3i8EvxMlo0CQeC2jqXGKPOGUh0lsH/8aRTBETRH3z2Tb fW9yG68XXqwskWOpAWYaHadHKlvpLajD+ACu+8Lzoy8UrkSEMx6TSQJau8924hciY1q7 QddMkEadE65qDOOLZ9NIVI0BVw4h0fcQUypLjqi1eyFj8kaYOiafUWpRt6obY305xhFT 3qOA== X-Gm-Message-State: AOUpUlF9KoJPCjxkzZqigEKcgEmMIOJ2IC/z46vLDjmdqYV4Ucc6DcgA v3raiJ7wQrKdicRfqslUCWXVe24A X-Google-Smtp-Source: AAOMgpcq6VoODyirERD9hmCDKDJSYgirZxBSDpITOKloZ+mJWOPriQW41CzZXUsJ6iUOW3pmykc15w== X-Received: by 2002:adf:db41:: with SMTP id f1-v6mr244370wrj.212.1531345538645; Wed, 11 Jul 2018 14:45:38 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id h5-v6sm10550936wrr.19.2018.07.11.14.45.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 14:45:37 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Wed, 11 Jul 2018 23:44:51 +0200 Message-Id: X-Mailer: git-send-email 2.18.0 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v11 01/25] devargs: use rte-log functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2018 21:45:39 -0000 Use the standard EAL logging functions in rte_devargs. Signed-off-by: Gaetan Rivet --- lib/librte_eal/common/eal_common_devargs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index b0434158b..894749e40 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include "eal_private.h" @@ -96,7 +97,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *format, ...) da->name[i] = devname[i]; i++; if (i == maxlen) { - fprintf(stderr, "WARNING: Parsing \"%s\": device name should be shorter than %zu\n", + RTE_LOG(WARNING, EAL, "Parsing \"%s\": device name should be shorter than %zu\n", dev, maxlen); da->name[i - 1] = '\0'; return -EINVAL; @@ -106,7 +107,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *format, ...) if (bus == NULL) { bus = rte_bus_find_by_device_name(da->name); if (bus == NULL) { - fprintf(stderr, "ERROR: failed to parse device \"%s\"\n", + RTE_LOG(ERR, EAL, "failed to parse device \"%s\"\n", da->name); return -EFAULT; } @@ -118,7 +119,7 @@ rte_devargs_parse(struct rte_devargs *da, const char *format, ...) else da->args = strdup(""); if (da->args == NULL) { - fprintf(stderr, "ERROR: not enough memory to parse arguments\n"); + RTE_LOG(ERR, EAL, "not enough memory to parse arguments\n"); return -ENOMEM; } return 0; -- 2.18.0