]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
monitor: do not log useless warnings
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 29 Oct 2017 16:26:13 +0000 (17:26 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 3 Nov 2017 07:37:09 +0000 (08:37 +0100)
lxc-monitord is deprecated so this is expected to fail.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/monitor.c

index 166329a7c6d2484e7ee2e13edb44d0e5f77b32ee..a16238992af87b345cddb31e21babaca6bf14627 100644 (file)
@@ -105,10 +105,10 @@ static void lxc_monitor_fifo_send(struct lxc_msg *msg, const char *lxcpath)
                /* It is normal for this open() to fail with ENXIO when there is
                 * no monitor running, so we don't log it.
                 */
-               if (errno == ENXIO)
+               if (errno == ENXIO || errno == ENOENT)
                        return;
 
-               WARN("Failed to open fifo to send message: %s.", strerror(errno));
+               WARN("%s - Failed to open fifo to send message", strerror(errno));
                return;
        }