From: Christian Brauner Date: Fri, 20 Mar 2020 16:53:05 +0000 (+0100) Subject: log: add missing variable and fix CMD_SYSINFO() X-Git-Tag: lxc-4.0.0~10^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3316%2Fhead;p=thirdparty%2Flxc.git log: add missing variable and fix CMD_SYSINFO() Signed-off-by: Christian Brauner --- 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