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
fc51f291
Commit
fc51f291
authored
Jul 06, 2016
by
Tycho Andersen
Committed by
Stéphane Graber
Aug 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c/r: add support for CRIU's --action-script
Signed-off-by:
Tycho Andersen
<
tycho.andersen@canonical.com
>
parent
606cd0e7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
criu.c
src/lxc/criu.c
+8
-0
lxccontainer.h
src/lxc/lxccontainer.h
+5
-0
No files found.
src/lxc/criu.c
View file @
fc51f291
...
@@ -185,6 +185,9 @@ static void exec_criu(struct criu_opts *opts)
...
@@ -185,6 +185,9 @@ static void exec_criu(struct criu_opts *opts)
if
(
opts
->
user
->
verbose
)
if
(
opts
->
user
->
verbose
)
static_args
++
;
static_args
++
;
if
(
opts
->
user
->
action_script
)
static_args
+=
2
;
ret
=
snprintf
(
log
,
PATH_MAX
,
"%s/%s.log"
,
opts
->
user
->
directory
,
opts
->
action
);
ret
=
snprintf
(
log
,
PATH_MAX
,
"%s/%s.log"
,
opts
->
user
->
directory
,
opts
->
action
);
if
(
ret
<
0
||
ret
>=
PATH_MAX
)
{
if
(
ret
<
0
||
ret
>=
PATH_MAX
)
{
ERROR
(
"logfile name too long
\n
"
);
ERROR
(
"logfile name too long
\n
"
);
...
@@ -235,6 +238,11 @@ static void exec_criu(struct criu_opts *opts)
...
@@ -235,6 +238,11 @@ static void exec_criu(struct criu_opts *opts)
if
(
opts
->
user
->
verbose
)
if
(
opts
->
user
->
verbose
)
DECLARE_ARG
(
"-vvvvvv"
);
DECLARE_ARG
(
"-vvvvvv"
);
if
(
opts
->
user
->
action_script
)
{
DECLARE_ARG
(
"--action-script"
);
DECLARE_ARG
(
opts
->
user
->
action_script
);
}
if
(
strcmp
(
opts
->
action
,
"dump"
)
==
0
||
strcmp
(
opts
->
action
,
"pre-dump"
)
==
0
)
{
if
(
strcmp
(
opts
->
action
,
"dump"
)
==
0
||
strcmp
(
opts
->
action
,
"pre-dump"
)
==
0
)
{
char
pid
[
32
],
*
freezer_relative
;
char
pid
[
32
],
*
freezer_relative
;
...
...
src/lxc/lxccontainer.h
View file @
fc51f291
...
@@ -891,6 +891,11 @@ struct migrate_opts {
...
@@ -891,6 +891,11 @@ struct migrate_opts {
* won't if e.g. you rsync the filesystems between two machines.
* won't if e.g. you rsync the filesystems between two machines.
*/
*/
bool
preserves_inodes
;
bool
preserves_inodes
;
/* Path to an executable script that will be registered as a criu
* "action script"
*/
char
*
action_script
;
};
};
/*!
/*!
...
...
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