Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichał Cłapiński <mclapinski@google.com>2019-08-08 19:49:13 +0300
committerAndrei Vagin <avagin@gmail.com>2020-02-04 23:37:37 +0300
commit2f337652ad5c40f7a420fdd9a7c57767af4ba8a0 (patch)
tree2b4ac06e1c8ffead219e0f5799bf8a0e4efe3475 /lib
parentad7e82a30f813b8b902026467434cc2e7421452e (diff)
Add new command line option: --cgroup-yard
Instead of creating cgroup yard in CRIU, now we can create it externally and pass it to CRIU. Useful if somebody doesn't want to grant CAP_SYS_ADMIN to CRIU. Signed-off-by: Michał Cłapiński <mclapinski@google.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/c/criu.c13
-rw-r--r--lib/c/criu.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/c/criu.c b/lib/c/criu.c
index 17d5c3983..14ddff26d 100644
--- a/lib/c/criu.c
+++ b/lib/c/criu.c
@@ -987,6 +987,19 @@ int criu_local_add_cg_dump_controller(criu_opts *opts, const char *name)
return 0;
}
+int criu_local_add_cg_yard(criu_opts *opts, const char *path)
+{
+ char *new;
+
+ new = strdup(path);
+ if (!new)
+ return -ENOMEM;
+
+ free(opts->rpc->cgroup_yard);
+ opts->rpc->cgroup_yard = new;
+ return 0;
+}
+
int criu_add_skip_mnt(const char *mnt)
{
return criu_local_add_skip_mnt(global_opts, mnt);
diff --git a/lib/c/criu.h b/lib/c/criu.h
index 76f3547fc..cb37c5291 100644
--- a/lib/c/criu.h
+++ b/lib/c/criu.h
@@ -207,6 +207,7 @@ int criu_local_add_irmap_path(criu_opts *opts, const char *path);
int criu_local_add_cg_props(criu_opts *opts, const char *stream);
int criu_local_add_cg_props_file(criu_opts *opts, const char *path);
int criu_local_add_cg_dump_controller(criu_opts *opts, const char *name);
+int criu_local_add_cg_yard(criu_opts *opts, const char *path);
int criu_local_add_inherit_fd(criu_opts *opts, int fd, const char *key);
int criu_local_add_external(criu_opts *opts, const char *key);
int criu_local_set_page_server_address_port(criu_opts *opts, const char *address, int port);