[lxc-devel] [lxc/master] lxcaufs: use correct branch syntax for aufs mounts

brauner on Github lxc-bot at linuxcontainers.org
Wed Apr 13 12:10:00 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 546 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160413/b549cc76/attachment.bin>
-------------- next part --------------
From 727b955ce37c8c9d140c73fa07de552f849e4d1a Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at mailbox.org>
Date: Wed, 13 Apr 2016 14:00:51 +0200
Subject: [PATCH] lxcaufs: use correct branch syntax for aufs mounts

Signed-off-by: Christian Brauner <christian.brauner at mailbox.org>
---
 src/lxc/bdev/lxcaufs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lxc/bdev/lxcaufs.c b/src/lxc/bdev/lxcaufs.c
index 0152966..bb578eb 100644
--- a/src/lxc/bdev/lxcaufs.c
+++ b/src/lxc/bdev/lxcaufs.c
@@ -248,7 +248,7 @@ int aufs_mount(struct bdev *bdev)
 		return -22;
 
 	//  separately mount it first
-	//  mount -t aufs -obr=${upper}=rw:${lower}=ro lower dest
+	//  mount -t aufs -o br:${upper}=rw:${lower}=ro lower dest
 	dup = alloca(strlen(bdev->src)+1);
 	strcpy(dup, bdev->src);
 	/* support multiple lower layers */
@@ -280,14 +280,14 @@ int aufs_mount(struct bdev *bdev)
 	// see http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg02587.html
 	//     http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg05126.html
 	if (mntdata) {
-		len = strlen(lower) + strlen(upper) + strlen(xinopath) + strlen("br==rw:=ro,,xino=") + strlen(mntdata) + 1;
+		len = strlen(lower) + strlen(upper) + strlen(xinopath) + strlen("br:=rw:=ro,,xino=") + strlen(mntdata) + 1;
 		options = alloca(len);
-		ret = snprintf(options, len, "br=%s=rw:%s=ro,%s,xino=%s", upper, lower, mntdata, xinopath);
+		ret = snprintf(options, len, "br:%s=rw:%s=ro,%s,xino=%s", upper, lower, mntdata, xinopath);
 	}
 	else {
-		len = strlen(lower) + strlen(upper) + strlen(xinopath) + strlen("br==rw:=ro,xino=") + 1;
+		len = strlen(lower) + strlen(upper) + strlen(xinopath) + strlen("br:=rw:=ro,xino=") + 1;
 		options = alloca(len);
-		ret = snprintf(options, len, "br=%s=rw:%s=ro,xino=%s", upper, lower, xinopath);
+		ret = snprintf(options, len, "br:%s=rw:%s=ro,xino=%s", upper, lower, xinopath);
 	}
 
 	if (ret < 0 || ret >= len) {
@@ -377,7 +377,7 @@ int aufs_mkdir(const struct mntent *mntent, const struct lxc_rootfs *rootfs,
 		goto err;
 
 	for (i = 0; i < arrlen; i++) {
-		if (strstr(opts[i], "br=") && (strlen(opts[i]) > (len = strlen("br="))))
+		if (strstr(opts[i], "br:") && (strlen(opts[i]) > (len = strlen("br:"))))
 			tmp = opts[i] + len;
 	}
 	if (!tmp)


More information about the lxc-devel mailing list