From b359d58b2ce8c568213086d27b84646c36d10bab Mon Sep 17 00:00:00 2001 From: Hajime Tazaki Date: Fri, 28 Oct 2016 16:40:08 +0900 Subject: [PATCH] lkl: fix print functions to use lkl_ prefixed ones This fix is useful when the underlying host doesn't have particular functions (e.g., strerr() and fprintf()) as such in non libc environment. Signed-off-by: Hajime Tazaki --- tools/lkl/lib/net.c | 2 +- tools/lkl/lib/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lkl/lib/net.c b/tools/lkl/lib/net.c index f218572246ac29..1e5b7eb6f2d2e7 100644 --- a/tools/lkl/lib/net.c +++ b/tools/lkl/lib/net.c @@ -381,7 +381,7 @@ static int check_error(struct lkl_sockaddr_nl *nladdr, struct lkl_nlmsghdr *n, return 0; lkl_printf("RTNETLINK answers: %s\n", - strerror(-err->error)); + lkl_strerror(-err->error)); return err->error; } lkl_printf("Unexpected reply!!!\n"); diff --git a/tools/lkl/lib/utils.c b/tools/lkl/lib/utils.c index 57cffe411fc2d0..b4631e09285233 100644 --- a/tools/lkl/lib/utils.c +++ b/tools/lkl/lib/utils.c @@ -155,7 +155,7 @@ void lkl_perror(char *msg, int err) const char *err_msg = lkl_strerror(err); /* We need to use 'real' printf because lkl_host_ops.print can * be turned off when debugging is off. */ - fprintf(stderr, "%s: %s\n", msg, err_msg); + lkl_printf("%s: %s\n", msg, err_msg); } static int lkl_vprintf(const char *fmt, va_list args)