From 3e92b6f7e4c98cbe348a92bba1e135b72f27668d Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Fri, 20 Mar 2020 17:53:05 +0100 Subject: [PATCH] log: add missing variable and fix CMD_SYSINFO() Signed-off-by: Christian Brauner --- src/lxc/log.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/lxc/log.h b/src/lxc/log.h index 50eafe5d6..7bd3556a8 100644 --- a/src/lxc/log.h +++ b/src/lxc/log.h @@ -464,7 +464,7 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ do { \ lxc_log_strerror_r; \ fprintf(stderr, "%s - %s: %d: %s: " format "\n", __FILE__, \ - __LINE__, __func__, ##__VA_ARGS__); \ + __LINE__, __func__, ptr, ##__VA_ARGS__); \ } while (0) #endif @@ -472,10 +472,11 @@ __lxc_unused static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo, \ #define CMD_SYSINFO(format, ...) \ printf("%m - " format, ##__VA_ARGS__) #else -#define CMD_SYSINFO(format, ...) \ - do { \ - lxc_log_strerror_r; \ - printf("%s - " format, ptr, ##__VA_ARGS__); \ +#define CMD_SYSINFO(format, ...) \ + do { \ + lxc_log_strerror_r; \ + prinft("%s - %s: %d: %s: " format "\n", __FILE__, __LINE__, \ + __func__, ptr, ##__VA_ARGS__); \ } while (0) #endif -- 2.47.2