Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d94eb390
Unverified
Commit
d94eb390
authored
May 17, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree-wide: s/parse_mntopts/parse_mntopts_legacy/
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
73936a0d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
conf.c
src/lxc/conf.c
+2
-2
conf.h
src/lxc/conf.h
+1
-1
confile.c
src/lxc/confile.c
+1
-1
criu.c
src/lxc/criu.c
+1
-1
btrfs.c
src/lxc/storage/btrfs.c
+1
-1
overlay.c
src/lxc/storage/overlay.c
+1
-1
storage_utils.c
src/lxc/storage/storage_utils.c
+1
-1
zfs.c
src/lxc/storage/zfs.c
+1
-1
No files found.
src/lxc/conf.c
View file @
d94eb390
...
@@ -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
;
...
...
src/lxc/conf.h
View file @
d94eb390
...
@@ -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
);
...
...
src/lxc/confile.c
View file @
d94eb390
...
@@ -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
);
...
...
src/lxc/criu.c
View file @
d94eb390
...
@@ -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 */
...
...
src/lxc/storage/btrfs.c
View file @
d94eb390
...
@@ -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
;
}
}
...
...
src/lxc/storage/overlay.c
View file @
d94eb390
...
@@ -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
);
...
...
src/lxc/storage/storage_utils.c
View file @
d94eb390
...
@@ -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
;
}
}
...
...
src/lxc/storage/zfs.c
View file @
d94eb390
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment