[lxc-devel] [lxc/master] Fix existing mount target check

stgraber on Github lxc-bot at linuxcontainers.org
Wed Feb 20 18:55:50 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190220/6e4716d7/attachment.bin>
-------------- next part --------------
From d8bc14a762b1b710b221e3fa40f8de19816e062b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 20 Feb 2019 10:55:09 -0800
Subject: [PATCH] Fix existing mount target check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 src/lxc/lxccontainer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
index 683bf5f43e..fee73c4439 100644
--- a/src/lxc/lxccontainer.c
+++ b/src/lxc/lxccontainer.c
@@ -4973,7 +4973,7 @@ static int create_mount_target(const char *dest, mode_t st_mode)
 
 	if (ret == 0)
 		TRACE("Created mount target \"%s\"", dest);
-	else if (ret < 0 && ret != EEXIST) {
+	else if (ret < 0 && errno != EEXIST) {
 		SYSERROR("Failed to create mount target \"%s\"", dest);
 		return -1;
 	}


More information about the lxc-devel mailing list