mirror of
git://github.com/lxc/lxc
synced 2025-09-04 08:39:58 +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;
|
return -1;
|
||||||
}
|
}
|
||||||
vg = lxc_global_config_value("lxc.bdev.lvm.vg");
|
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;
|
len = strlen("/dev/") + strlen(vg) + strlen(cname) + 4 + 2;
|
||||||
new->src = malloc(len);
|
new->src = malloc(len);
|
||||||
if (new->src)
|
if (new->src)
|
||||||
|
Reference in New Issue
Block a user