if (!rootfs->storage)
return log_error(-1, "Failed to mount rootfs \"%s\" onto \"%s\" with options \"%s\"",
rootfs->path, rootfs->mount,
- rootfs->options ? rootfs->options : "(null)");
+ rootfs->mnt_opts.raw_options ? rootfs->mnt_opts.raw_options : "(null)");
return 0;
}
if (ret < 0)
return log_error(-1, "Failed to mount rootfs \"%s\" onto \"%s\" with options \"%s\"",
rootfs->path, rootfs->mount,
- rootfs->options ? rootfs->options : "(null)");
+ rootfs->mnt_opts.raw_options ? rootfs->mnt_opts.raw_options : "(null)");
DEBUG("Mounted rootfs \"%s\" onto \"%s\" with options \"%s\"",
rootfs->path, rootfs->mount,
- rootfs->options ? rootfs->options : "(null)");
+ rootfs->mnt_opts.raw_options ? rootfs->mnt_opts.raw_options : "(null)");
rootfs->dfd_mnt = open_at(-EBADF, rootfs->mount, PROTECT_OPATH_DIRECTORY, PROTECT_LOOKUP_ABSOLUTE_XDEV, 0);
if (rootfs->dfd_mnt < 0)
lxc_terminal_conf_free(&conf->console);
free(conf->rootfs.mount);
free(conf->rootfs.bdev_type);
- free(conf->rootfs.options);
free(conf->rootfs.path);
put_lxc_rootfs(&conf->rootfs, true);
free(conf->logfile);
unsigned long prop_flags;
char *data;
struct lxc_mount_attr attr;
+ char *raw_options;
};
/* Defines a structure to store the rootfs location, the
* @mount : where it is mounted
* @buf : static buffer to construct paths
* @bev_type : optional backing store type
- * @options : mount options
* @managed : whether it is managed by LXC
* @dfd_mnt : fd for @mount
* @dfd_dev : fd for /dev of the container
char buf[PATH_MAX];
char *bdev_type;
- char *options;
bool managed;
struct lxc_mount_options mnt_opts;
struct lxc_storage *storage;
mnt_opts->prop_flags = 0;
free_disarm(mnt_opts->data);
+ free_disarm(mnt_opts->raw_options);
}
static inline void put_lxc_rootfs(struct lxc_rootfs *rootfs, bool unpin)
if (ret < 0)
return ret_errno(EINVAL);
- rootfs->options = move_ptr(raw_options);
+ rootfs->mnt_opts.raw_options = move_ptr(raw_options);
return 0;
}
static int get_config_rootfs_options(const char *key, char *retv, int inlen,
struct lxc_conf *c, void *data)
{
- return lxc_get_conf_str(retv, inlen, c->rootfs.options);
+ return lxc_get_conf_str(retv, inlen, c->rootfs.mnt_opts.raw_options);
}
static int get_config_uts_name(const char *key, char *retv, int inlen,
static inline int clr_config_rootfs_options(const char *key, struct lxc_conf *c,
void *data)
{
- free_disarm(c->rootfs.options);
put_lxc_mount_options(&c->rootfs.mnt_opts);
return 0;
const struct lxc_storage_type *q;
const char *src = conf->rootfs.path;
const char *dst = conf->rootfs.mount;
- const char *mntopts = conf->rootfs.options;
+ const char *mntopts = conf->rootfs.mnt_opts.raw_options;
BUILD_BUG_ON(LXC_STORAGE_INTERNAL_OVERLAY_RESTORE <= LXC_CLONE_MAXFLAGS);