]> git.proxmox.com Git - lxc.git/blame - debian/patches/do-not-use-config-path-for-rootfs.patch
use a better way to set /var/lib/vz as default
[lxc.git] / debian / patches / do-not-use-config-path-for-rootfs.patch
CommitLineData
bc2d5fe3
DM
1Index: new/src/lxc/lxccontainer.c
2===================================================================
3--- new.orig/src/lxc/lxccontainer.c
4+++ new/src/lxc/lxccontainer.c
5@@ -819,10 +819,10 @@ static struct bdev *do_bdev_create(struc
6 dest = alloca(len);
7 ret = snprintf(dest, len, "%s", rpath);
8 } else {
9- const char *lxcpath = lxcapi_get_config_path(c);
10- len = strlen(c->name) + strlen(lxcpath) + 9;
11+ const char *rootfs_path = "/var/lib/lxc";
12+ len = strlen(c->name) + strlen(rootfs_path) + 9;
13 dest = alloca(len);
14- ret = snprintf(dest, len, "%s/%s/rootfs", lxcpath, c->name);
15+ ret = snprintf(dest, len, "%s/%s/rootfs", rootfs_path, c->name);
16 }
17 if (ret < 0 || ret >= len)
18 return NULL;