Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
if (!q)
return NULL;
- bdev = malloc(sizeof(struct lxc_storage));
+ bdev = zalloc(sizeof(struct lxc_storage));
if (!bdev)
return NULL;
- memset(bdev, 0, sizeof(struct lxc_storage));
-
- bdev->ops = q->ops;
- bdev->type = q->name;
+ bdev->ops = q->ops;
+ bdev->type = q->name;
+ bdev->rootfs = &conf->rootfs;
if (mntopts)
bdev->mntopts = strdup(mntopts);
#endif
#include "compiler.h"
+#include "conf.h"
#ifndef MS_DIRSYNC
#define MS_DIRSYNC 128
/* index for the connected nbd device. */
int nbd_idx;
int flags;
+ struct lxc_rootfs *rootfs;
};
/**