]> 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>
Thu, 9 Nov 2017 00:21:16 +0000 (01:21 +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 45bda0be4b2390bc3d7111825fb240baf5e8b9ef..57722ae087da4ee6f03178ad155e0aec9288f060 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;
        }