[CRIU] [PATCH 3/2] libcriu: Add criu_set_cpu_cap helper
Cyrill Gorcunov
gorcunov at gmail.com
Fri Feb 28 06:59:55 PST 2014
To setup cpu capability mask.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
Sorry for that strange patch number
lib/criu.c | 6 ++++++
lib/criu.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/lib/criu.c b/lib/criu.c
index cb61518f765f..33927e8c9963 100644
--- a/lib/criu.c
+++ b/lib/criu.c
@@ -104,6 +104,12 @@ void criu_set_log_file(char *log_file)
opts->log_file = strdup(log_file);
}
+void criu_set_cpu_cap(unsigned int cap)
+{
+ opts->has_cpu_cap = true;
+ opts->cpu_cap = cap;
+}
+
static CriuResp *recv_resp(int socket_fd)
{
unsigned char buf[CR_MAX_MSG_SIZE];
diff --git a/lib/criu.h b/lib/criu.h
index fe84eb08aaa7..9c7beda42bbc 100644
--- a/lib/criu.h
+++ b/lib/criu.h
@@ -40,6 +40,7 @@ void criu_set_shell_job(bool shell_job);
void criu_set_file_locks(bool file_locks);
void criu_set_log_level(int log_level);
void criu_set_log_file(char *log_file);
+void criu_set_cpu_cap(unsigned int cap);
/* Here is a table of return values and errno's of functions
* from the list down below.
--
1.8.3.1
More information about the CRIU
mailing list