2
0
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:
Christian Brauner
2017-07-28 06:17:01 +02:00
parent bef81ce588
commit 01e5fa0792

View File

@@ -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)