From: Gaetan Rivet Date: Wed, 11 Jul 2018 21:44:51 +0000 (+0200) Subject: devargs: use log functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0436120e33e0e117ce294a024555f522a7e68fb3;p=dpdk.git devargs: use log functions Use the standard EAL logging functions in rte_devargs. Signed-off-by: Gaetan Rivet --- 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;