From 0436120e33e0e117ce294a024555f522a7e68fb3 Mon Sep 17 00:00:00 2001 From: Gaetan Rivet Date: Wed, 11 Jul 2018 23:44:51 +0200 Subject: [PATCH] devargs: use log functions 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 b0434158b0..894749e406 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.20.1