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
29f36c71
Unverified
Commit
29f36c71
authored
Feb 10, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
criu: use cleanup macro when parsing mount data
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
934d0d8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
criu.c
src/lxc/criu.c
+5
-10
No files found.
src/lxc/criu.c
View file @
29f36c71
...
...
@@ -350,28 +350,23 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
return
log_error_errno
(
-
ENOENT
,
ENOENT
,
"Failed to create anonymous mount file"
);
while
(
getmntent_r
(
f_mnt
,
&
mntent
,
buf
,
sizeof
(
buf
)))
{
__do_free
char
*
mnt_options
=
NULL
;
unsigned
long
flags
=
0
;
char
*
mntdata
=
NULL
;
char
arg
[
2
*
PATH_MAX
+
2
];
if
(
parse_mntopts
(
mntent
.
mnt_opts
,
&
flags
,
&
mnt
data
)
<
0
)
if
(
parse_mntopts
(
mntent
.
mnt_opts
,
&
flags
,
&
mnt
_options
)
<
0
)
return
log_error_errno
(
-
EINVAL
,
EINVAL
,
"Failed to parse mount options"
);
free
(
mntdata
);
/* only add --ext-mount-map for actual bind mounts */
if
(
!
(
flags
&
MS_BIND
))
continue
;
if
(
strcmp
(
opts
->
action
,
"dump"
)
==
0
)
ret
=
snprintf
(
arg
,
sizeof
(
arg
),
"/%s:%s"
,
mntent
.
mnt_dir
,
mntent
.
mnt_dir
);
ret
=
snprintf
(
arg
,
sizeof
(
arg
),
"/%s:%s"
,
mntent
.
mnt_dir
,
mntent
.
mnt_dir
);
else
ret
=
snprintf
(
arg
,
sizeof
(
arg
),
"%s:%s"
,
mntent
.
mnt_dir
,
mntent
.
mnt_fsname
);
if
(
ret
<
0
||
ret
>=
sizeof
(
arg
))
{
ret
=
snprintf
(
arg
,
sizeof
(
arg
),
"%s:%s"
,
mntent
.
mnt_dir
,
mntent
.
mnt_fsname
);
if
(
ret
<
0
||
ret
>=
sizeof
(
arg
))
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to create mount entry"
);
}
DECLARE_ARG
(
"--ext-mount-map"
);
DECLARE_ARG
(
arg
);
...
...
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