Skip to content

Commit

Permalink
Fix /dev symlinks without a rootfs
Browse files Browse the repository at this point in the history
Signed-off-by: David Ward <david.ward@ll.mit.edu>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
  • Loading branch information
dpward authored and stgraber committed Aug 27, 2015
1 parent 5c4d65d commit d9615f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lxc/conf.c
Expand Up @@ -927,7 +927,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;

Expand Down

0 comments on commit d9615f4

Please sign in to comment.