}
-static int setup_rootfs_pivot_root(const char *rootfs, const char *pivotdir)
+static int setup_rootfs_pivot_root(const char *rootfs)
{
int oldroot = -1, newroot = -1;
if (detect_ramfs_rootfs()) {
if (prepare_ramfs_root(rootfs->mount))
return -1;
- } else if (setup_rootfs_pivot_root(rootfs->mount, rootfs->pivot)) {
+ } else if (setup_rootfs_pivot_root(rootfs->mount)) {
ERROR("failed to setup pivot root");
return -1;
}
free(conf->rootfs.mount);
free(conf->rootfs.options);
free(conf->rootfs.path);
- free(conf->rootfs.pivot);
free(conf->logfile);
if (conf->logfd != -1)
close(conf->logfd);
/*
* Defines a structure to store the rootfs location, the
* optionals pivot_root, rootfs mount paths
- * @rootfs : a path to the rootfs
- * @pivot_root : a path to a pivot_root location to be used
+ * @path : the rootfs source (directory or device)
+ * @mount : where it is mounted
+ * @options : mount options
*/
struct lxc_rootfs {
char *path;
char *mount;
- char *pivot;
char *options;
};
struct lxc_conf *lxc_conf)
{
WARN("lxc.pivotdir is ignored. It will soon become an error.");
- return config_path_item(&lxc_conf->rootfs.pivot, value);
+ return 0;
}
static int config_utsname(const char *key, const char *value,
v = c->rootfs.options;
else if (strcmp(key, "lxc.rootfs") == 0)
v = c->rootfs.path;
- else if (strcmp(key, "lxc.pivotdir") == 0)
- v = c->rootfs.pivot;
else if (strcmp(key, "lxc.cap.drop") == 0)
return lxc_get_item_cap_drop(c, retv, inlen);
else if (strcmp(key, "lxc.cap.keep") == 0)