Commit 9de1f3ef by David Ward Committed by Stéphane Graber

Fix /dev symlinks without a rootfs

parent 2b3e9dde
...@@ -942,7 +942,7 @@ static int setup_dev_symlinks(const struct lxc_rootfs *rootfs) ...@@ -942,7 +942,7 @@ static int setup_dev_symlinks(const struct lxc_rootfs *rootfs)
for (i = 0; i < sizeof(dev_symlinks) / sizeof(dev_symlinks[0]); i++) { for (i = 0; i < sizeof(dev_symlinks) / sizeof(dev_symlinks[0]); i++) {
const struct dev_symlinks *d = &dev_symlinks[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) if (ret < 0 || ret >= MAXPATHLEN)
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment