Skip to content

Commit

Permalink
lkl: fix print functions to use lkl_ prefixed ones
Browse files Browse the repository at this point in the history
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 <thehajime@gmail.com>
  • Loading branch information
thehajime committed Nov 21, 2016
1 parent a4c9c32 commit b359d58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/lkl/lib/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion tools/lkl/lib/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b359d58

Please sign in to comment.