]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
log: add missing variable and fix CMD_SYSINFO() 3316/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 20 Mar 2020 16:53:05 +0000 (17:53 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 20 Mar 2020 16:53:05 +0000 (17:53 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/log.h

index 50eafe5d6bb35d0028b24aea0becc60ac3f4d1c1..7bd3556a8e28cb0cf3bea904e5fdb93a349837df 100644 (file)
@@ -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