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
dc05afb2
Unverified
Commit
dc05afb2
authored
Feb 10, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
criu: move logging under lxc_log_trace()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
2b6fc88b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
criu.c
src/lxc/criu.c
+9
-5
No files found.
src/lxc/criu.c
View file @
dc05afb2
...
@@ -172,7 +172,6 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
...
@@ -172,7 +172,6 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
struct
mntent
mntent
;
struct
mntent
mntent
;
char
buf
[
4096
],
ttys
[
32
];
char
buf
[
4096
],
ttys
[
32
];
size_t
pos
;
/* If we are currently in a cgroup /foo/bar, and the container is in a
/* If we are currently in a cgroup /foo/bar, and the container is in a
* cgroup /lxc/foo, lxcfs will give us an ENOENT if some task in the
* cgroup /lxc/foo, lxcfs will give us an ENOENT if some task in the
...
@@ -533,6 +532,8 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
...
@@ -533,6 +532,8 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
}
}
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
))
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
))
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to append veth device name"
);
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to append veth device name"
);
TRACE
(
"Added veth device entry %s"
,
buf
);
break
;
break
;
case
LXC_NET_MACVLAN
:
case
LXC_NET_MACVLAN
:
if
(
n
->
link
[
0
]
==
'\0'
)
if
(
n
->
link
[
0
]
==
'\0'
)
...
@@ -541,6 +542,9 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
...
@@ -541,6 +542,9 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"macvlan[%s]:%s"
,
eth
,
n
->
link
);
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"macvlan[%s]:%s"
,
eth
,
n
->
link
);
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
))
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
))
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to add macvlan entry"
);
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to add macvlan entry"
);
TRACE
(
"Added macvlan device entry %s"
,
buf
);
break
;
break
;
case
LXC_NET_NONE
:
case
LXC_NET_NONE
:
case
LXC_NET_EMPTY
:
case
LXC_NET_EMPTY
:
...
@@ -562,10 +566,9 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
...
@@ -562,10 +566,9 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
args
->
argv
[
args
->
argc
]
=
NULL
;
args
->
argv
[
args
->
argc
]
=
NULL
;
if
(
lxc_log_trace
())
{
buf
[
0
]
=
0
;
buf
[
0
]
=
0
;
pos
=
0
;
for
(
int
i
=
0
,
pos
=
0
;
i
<
args
->
argc
&&
args
->
argv
[
i
];
i
++
)
{
for
(
int
i
=
0
;
args
->
argc
;
i
++
)
{
ret
=
snprintf
(
buf
+
pos
,
sizeof
(
buf
)
-
pos
,
"%s "
,
args
->
argv
[
i
]);
ret
=
snprintf
(
buf
+
pos
,
sizeof
(
buf
)
-
pos
,
"%s "
,
args
->
argv
[
i
]);
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
)
-
pos
)
if
(
ret
<
0
||
ret
>=
sizeof
(
buf
)
-
pos
)
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to reorder entries"
);
return
log_error_errno
(
-
EIO
,
EIO
,
"Failed to reorder entries"
);
...
@@ -573,7 +576,8 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
...
@@ -573,7 +576,8 @@ static int exec_criu(struct cgroup_ops *cgroup_ops, struct lxc_conf *conf,
pos
+=
ret
;
pos
+=
ret
;
}
}
INFO
(
"execing: %s"
,
buf
);
TRACE
(
"Using command line %s"
,
buf
);
}
/* before criu inits its log, it sometimes prints things to stdout/err;
/* before criu inits its log, it sometimes prints things to stdout/err;
* let's be sure we capture that.
* let's be sure we capture that.
...
...
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