Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
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
zhul
criu
Commits
0091f819
Commit
0091f819
authored
Jan 28, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service: Start page-server request implementation
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
97535012
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
cr-service.c
cr-service.c
+35
-0
No files found.
cr-service.c
View file @
0091f819
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include "cr-service.h"
#include "cr-service.h"
#include "cr-service-const.h"
#include "cr-service-const.h"
#include "sd-daemon.h"
#include "sd-daemon.h"
#include "page-xfer.h"
unsigned
int
service_sk_ino
=
-
1
;
unsigned
int
service_sk_ino
=
-
1
;
...
@@ -317,6 +318,38 @@ static int check(int sk)
...
@@ -317,6 +318,38 @@ static int check(int sk)
return
send_criu_msg
(
sk
,
&
resp
);
return
send_criu_msg
(
sk
,
&
resp
);
}
}
static
int
start_page_server_req
(
int
sk
,
CriuOpts
*
opts
)
{
int
ret
;
bool
success
=
false
;
CriuResp
resp
=
CRIU_RESP__INIT
;
CriuPageServerInfo
ps
=
CRIU_PAGE_SERVER_INFO__INIT
;
if
(
!
opts
->
ps
)
{
pr_err
(
"No page server info in message
\n
"
);
goto
out
;
}
if
(
setup_opts_from_req
(
sk
,
opts
))
goto
out
;
pr_debug
(
"Starting page server
\n
"
);
ret
=
cr_page_server
(
true
);
if
(
ret
>
0
)
{
success
=
true
;
ps
.
has_pid
=
true
;
ps
.
pid
=
ret
;
resp
.
ps
=
&
ps
;
}
pr_debug
(
"Page server started
\n
"
);
out:
resp
.
type
=
CRIU_REQ_TYPE__PAGE_SERVER
;
resp
.
success
=
success
;
return
send_criu_msg
(
sk
,
&
resp
);
}
static
int
cr_service_work
(
int
sk
)
static
int
cr_service_work
(
int
sk
)
{
{
CriuReq
*
msg
=
0
;
CriuReq
*
msg
=
0
;
...
@@ -335,6 +368,8 @@ static int cr_service_work(int sk)
...
@@ -335,6 +368,8 @@ static int cr_service_work(int sk)
return
restore_using_req
(
sk
,
msg
->
opts
);
return
restore_using_req
(
sk
,
msg
->
opts
);
case
CRIU_REQ_TYPE__CHECK
:
case
CRIU_REQ_TYPE__CHECK
:
return
check
(
sk
);
return
check
(
sk
);
case
CRIU_REQ_TYPE__PAGE_SERVER
:
return
start_page_server_req
(
sk
,
msg
->
opts
);
default:
default:
send_criu_err
(
sk
,
"Invalid req"
);
send_criu_err
(
sk
,
"Invalid req"
);
...
...
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