[CRIU] [PATCH] libcriu: add work_dir support

Ruslan Kuprieiev kupruser at gmail.com
Tue Feb 4 00:39:54 PST 2014


As we've added work_dir_fd to RPC, lets add support for it to libcriu.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 lib/criu.c | 6 ++++++
 lib/criu.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/lib/criu.c b/lib/criu.c
index f0feba3..cb61518 100644
--- a/lib/criu.c
+++ b/lib/criu.c
@@ -51,6 +51,12 @@ void criu_set_images_dir_fd(int fd)
 	opts->images_dir_fd = fd;
 }
 
+void criu_set_work_dir_fd(int fd)
+{
+	opts->has_work_dir_fd	= true;
+	opts->work_dir_fd	= fd;
+}
+
 void criu_set_leave_running(bool leave_running)
 {
 	opts->has_leave_running	= true;
diff --git a/lib/criu.h b/lib/criu.h
index 238197d..fe84eb0 100644
--- a/lib/criu.h
+++ b/lib/criu.h
@@ -31,6 +31,7 @@ int criu_init_opts(void);
 
 void criu_set_pid(int pid);
 void criu_set_images_dir_fd(int fd); /* must be set for dump/restore */
+void criu_set_work_dir_fd(int fd);
 void criu_set_leave_running(bool leave_running);
 void criu_set_ext_unix_sk(bool ext_unix_sk);
 void criu_set_tcp_established(bool tcp_established);
-- 
1.8.3.2



More information about the CRIU mailing list