mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-24 22:56:47 +00:00
Fix /dev symlinks without a rootfs
Signed-off-by: David Ward <david.ward@ll.mit.edu> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
00370edd53
commit
cd2b3cfe37
@ -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++) {
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user