mirror of
git://github.com/lxc/lxc
synced 2025-08-31 21:07:18 +00:00
lvm: check whether lxc.bdev.lvm.vg is set
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -307,6 +307,11 @@ int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
|
||||
return -1;
|
||||
}
|
||||
vg = lxc_global_config_value("lxc.bdev.lvm.vg");
|
||||
if (!vg) {
|
||||
ERROR("The \"lxc.bdev.lvm.vg\" key is not set");
|
||||
return -1;
|
||||
}
|
||||
|
||||
len = strlen("/dev/") + strlen(vg) + strlen(cname) + 4 + 2;
|
||||
new->src = malloc(len);
|
||||
if (new->src)
|
||||
|
Reference in New Issue
Block a user