lvm: check whether lxc.bdev.lvm.vg is set

parent bef81ce5
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment