eal: remove redundant error output
Checks
Commit Message
The function rte_eal_init_alert ends up printing the same message
twice. Once via RTE_LOG and once to stderr. Remove the fprintf
to stderr since it is redundant.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/librte_eal/linux/eal/eal.c | 1 -
1 file changed, 1 deletion(-)
Comments
Stephen Hemminger <stephen@networkplumber.org> writes:
> The function rte_eal_init_alert ends up printing the same message
> twice. Once via RTE_LOG and once to stderr. Remove the fprintf
> to stderr since it is redundant.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
This was originally added at your suggestion:
http://mails.dpdk.org/archives/dev/2017-January/056431.html
Because sometimes we have these alerts before logging is up (so the
RTE_LOG(...) won't show up, I gather).
Is it possible to have an either/or?
> lib/librte_eal/linux/eal/eal.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
> index 946222ccdb7a..076fb3cbde5f 100644
> --- a/lib/librte_eal/linux/eal/eal.c
> +++ b/lib/librte_eal/linux/eal/eal.c
> @@ -949,7 +949,6 @@ static int rte_eal_vfio_setup(void)
>
> static void rte_eal_init_alert(const char *msg)
> {
> - fprintf(stderr, "EAL: FATAL: %s\n", msg);
> RTE_LOG(ERR, EAL, "%s\n", msg);
> }
@@ -949,7 +949,6 @@ static int rte_eal_vfio_setup(void)
static void rte_eal_init_alert(const char *msg)
{
- fprintf(stderr, "EAL: FATAL: %s\n", msg);
RTE_LOG(ERR, EAL, "%s\n", msg);
}