tree-wide: s/parse_mntopts/parse_mntopts_legacy/

parent 73936a0d
...@@ -2000,7 +2000,7 @@ static int parse_mntopt(char *opt, unsigned long *flags, char **data, size_t siz ...@@ -2000,7 +2000,7 @@ static int parse_mntopt(char *opt, unsigned long *flags, char **data, size_t siz
return 0; return 0;
} }
int parse_mntopts(const char *mntopts, unsigned long *mntflags, char **mntdata) int parse_mntopts_legacy(const char *mntopts, unsigned long *mntflags, char **mntdata)
{ {
__do_free char *mntopts_new = NULL, *mntopts_dup = NULL; __do_free char *mntopts_new = NULL, *mntopts_dup = NULL;
char *mntopt_cur = NULL; char *mntopt_cur = NULL;
...@@ -2354,7 +2354,7 @@ static inline int mount_entry_on_generic(struct mntent *mntent, ...@@ -2354,7 +2354,7 @@ static inline int mount_entry_on_generic(struct mntent *mntent,
if (ret < 0) if (ret < 0)
return -1; return -1;
ret = parse_mntopts(mntent->mnt_opts, &mntflags, &mntdata); ret = parse_mntopts_legacy(mntent->mnt_opts, &mntflags, &mntdata);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
...@@ -539,7 +539,7 @@ __hidden extern int userns_exec_1(const struct lxc_conf *conf, int (*fn)(void *) ...@@ -539,7 +539,7 @@ __hidden extern int userns_exec_1(const struct lxc_conf *conf, int (*fn)(void *)
const char *fn_name); const char *fn_name);
__hidden extern int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data, __hidden extern int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data,
const char *fn_name); const char *fn_name);
__hidden extern int parse_mntopts(const char *mntopts, unsigned long *mntflags, char **mntdata); __hidden extern int parse_mntopts_legacy(const char *mntopts, unsigned long *mntflags, char **mntdata);
__hidden extern int parse_propagationopts(const char *mntopts, unsigned long *pflags); __hidden extern int parse_propagationopts(const char *mntopts, unsigned long *pflags);
__hidden extern int parse_lxc_mntopts(struct lxc_mount_options *opts, char *mnt_opts); __hidden extern int parse_lxc_mntopts(struct lxc_mount_options *opts, char *mnt_opts);
__hidden extern void tmp_proc_unmount(struct lxc_conf *lxc_conf); __hidden extern void tmp_proc_unmount(struct lxc_conf *lxc_conf);
......
...@@ -2803,7 +2803,7 @@ static int set_config_rootfs_options(const char *key, const char *value, ...@@ -2803,7 +2803,7 @@ static int set_config_rootfs_options(const char *key, const char *value,
if (ret < 0) if (ret < 0)
return ret; return ret;
ret = parse_mntopts(dup, &mnt_opts->mnt_flags, &mdata); ret = parse_mntopts_legacy(dup, &mnt_opts->mnt_flags, &mdata);
if (ret < 0) if (ret < 0)
return ret_errno(EINVAL); return ret_errno(EINVAL);
......
...@@ -359,7 +359,7 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf, ...@@ -359,7 +359,7 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
unsigned long flags = 0; unsigned long flags = 0;
char arg[2 * PATH_MAX + 2]; char arg[2 * PATH_MAX + 2];
if (parse_mntopts(mntent.mnt_opts, &flags, &mnt_options) < 0) if (parse_mntopts_legacy(mntent.mnt_opts, &flags, &mnt_options) < 0)
return log_error_errno(-EINVAL, EINVAL, "Failed to parse mount options"); return log_error_errno(-EINVAL, EINVAL, "Failed to parse mount options");
/* only add --ext-mount-map for actual bind mounts */ /* only add --ext-mount-map for actual bind mounts */
......
...@@ -203,7 +203,7 @@ int btrfs_mount(struct lxc_storage *bdev) ...@@ -203,7 +203,7 @@ int btrfs_mount(struct lxc_storage *bdev)
if (!bdev->src || !bdev->dest) if (!bdev->src || !bdev->dest)
return -22; return -22;
if (parse_mntopts(bdev->mntopts, &mntflags, &mntdata) < 0) { if (parse_mntopts_legacy(bdev->mntopts, &mntflags, &mntdata) < 0) {
free(mntdata); free(mntdata);
return -22; return -22;
} }
......
...@@ -414,7 +414,7 @@ int ovl_mount(struct lxc_storage *bdev) ...@@ -414,7 +414,7 @@ int ovl_mount(struct lxc_storage *bdev)
work = must_make_path(upper, LXC_OVERLAY_WORK_DIR, NULL); work = must_make_path(upper, LXC_OVERLAY_WORK_DIR, NULL);
upper[lastslash - upper] = '/'; upper[lastslash - upper] = '/';
ret = parse_mntopts(bdev->mntopts, &mntflags, &mntdata); ret = parse_mntopts_legacy(bdev->mntopts, &mntflags, &mntdata);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to parse mount options"); ERROR("Failed to parse mount options");
free(mntdata); free(mntdata);
......
...@@ -327,7 +327,7 @@ int find_fstype_cb(char *buffer, void *data) ...@@ -327,7 +327,7 @@ int find_fstype_cb(char *buffer, void *data)
DEBUG("Trying to mount \"%s\"->\"%s\" with FSType \"%s\"", cbarg->rootfs, DEBUG("Trying to mount \"%s\"->\"%s\" with FSType \"%s\"", cbarg->rootfs,
cbarg->target, fstype); cbarg->target, fstype);
if (parse_mntopts(cbarg->options, &mntflags, &mntdata) < 0) { if (parse_mntopts_legacy(cbarg->options, &mntflags, &mntdata) < 0) {
free(mntdata); free(mntdata);
return 0; return 0;
} }
......
...@@ -173,7 +173,7 @@ int zfs_mount(struct lxc_storage *bdev) ...@@ -173,7 +173,7 @@ int zfs_mount(struct lxc_storage *bdev)
if (!bdev->src || !bdev->dest) if (!bdev->src || !bdev->dest)
return -22; return -22;
ret = parse_mntopts(bdev->mntopts, &mntflags, &mntdata); ret = parse_mntopts_legacy(bdev->mntopts, &mntflags, &mntdata);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to parse mount options"); ERROR("Failed to parse mount options");
return -22; return -22;
......
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