[lxc-devel] [PATCH stable-1.1 3/7] Fix /dev symlinks without a rootfs
David Ward
david.ward at ll.mit.edu
Tue Jun 23 14:57:28 UTC 2015
Signed-off-by: David Ward <david.ward at ll.mit.edu>
---
src/lxc/conf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 1f80e5c..6650c44 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -931,7 +931,7 @@ static int setup_dev_symlinks(const struct lxc_rootfs *rootfs)
for (i = 0; i < sizeof(dev_symlinks) / sizeof(dev_symlinks[0]); i++) {
const struct dev_symlinks *d = &dev_symlinks[i];
- ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->mount, d->name);
+ ret = snprintf(path, sizeof(path), "%s/dev/%s", rootfs->path ? rootfs->mount : "", d->name);
if (ret < 0 || ret >= MAXPATHLEN)
return -1;
--
1.7.1
More information about the lxc-devel
mailing list