[CRIU] [PATCH 6/9] plugin: add a function to get a descriptor to the image dir
Andrey Vagin
avagin at openvz.org
Thu Dec 19 09:35:02 PST 2013
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
include/criu-plugin.h | 3 +++
util.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/include/criu-plugin.h b/include/criu-plugin.h
index b022a5f..b205c10 100644
--- a/include/criu-plugin.h
+++ b/include/criu-plugin.h
@@ -28,4 +28,7 @@ typedef void (cr_plugin_fini_t)(void);
typedef int (cr_plugin_dump_unix_sk_t)(int fd, int id);
typedef int (cr_plugin_restore_unix_sk_t)(int id);
+/* Public API */
+extern int criu_get_image_dir(void);
+
#endif
diff --git a/util.c b/util.c
index c591331..3f37302 100644
--- a/util.c
+++ b/util.c
@@ -319,6 +319,11 @@ int get_service_fd(enum sfd_type type)
return __get_service_fd(type, service_fd_id);
}
+int criu_get_image_dir(void)
+{
+ return get_service_fd(IMG_FD_OFF);
+}
+
int close_service_fd(enum sfd_type type)
{
int fd;
--
1.8.3.1
More information about the CRIU
mailing list