2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-02 15:25:21 +00:00

crtools: initial skeleton for cr_service

The criu service is a daemon, that opens a unix socket and listens for
incoming requests. The requests will be declared in protobuf/rpc.proto
and for now will only contain the 'dump' request.

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Ruslan Kuprieiev
2013-09-13 13:43:56 +04:00
committed by Pavel Emelyanov
parent b67afac623
commit eb79300dfd
4 changed files with 17 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ obj-y += stats.o
obj-y += string.o obj-y += string.o
obj-y += sigframe.o obj-y += sigframe.o
obj-y += arch/$(ARCH)/vdso.o obj-y += arch/$(ARCH)/vdso.o
obj-y += cr-service.o
ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),clean)
incdeps := y incdeps := y

6
cr-service.c Normal file
View File

@@ -0,0 +1,6 @@
#include "cr-service.h"
int cr_service()
{
return 0;
}

View File

@@ -29,6 +29,7 @@
#include "page-xfer.h" #include "page-xfer.h"
#include "tty.h" #include "tty.h"
#include "file-lock.h" #include "file-lock.h"
#include "cr-service.h"
struct cr_options opts; struct cr_options opts;
@@ -334,6 +335,9 @@ int main(int argc, char *argv[])
if (!strcmp(argv[optind], "page-server")) if (!strcmp(argv[optind], "page-server"))
return cr_page_server(opts.restore_detach); return cr_page_server(opts.restore_detach);
if (!strcmp(argv[optind], "service"))
return cr_service();
pr_msg("Unknown command \"%s\"\n", argv[optind]); pr_msg("Unknown command \"%s\"\n", argv[optind]);
usage: usage:
pr_msg("\n" pr_msg("\n"

6
include/cr-service.h Normal file
View File

@@ -0,0 +1,6 @@
#ifndef __CR_SERVICE_H__
#define __CR_SERVICE_H__
int cr_service(void);
#endif