[CRIU] [PATCH 2/4] mount: Export print_ns_root
Cyrill Gorcunov
gorcunov at openvz.org
Tue Aug 8 14:25:08 MSK 2017
Will need for bind-mounted unix sockets restore.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/include/mount.h | 1 +
criu/mount.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/include/mount.h b/criu/include/mount.h
index e60dd348fc9f..0797c0a6f01e 100644
--- a/criu/include/mount.h
+++ b/criu/include/mount.h
@@ -79,6 +79,7 @@ static inline int collect_binfmt_misc(void) { return 0; }
extern struct mount_info *mnt_entry_alloc();
extern void mnt_entry_free(struct mount_info *mi);
+extern int print_ns_root(struct ns_id *ns, int remap_id, char *buf, int bs);
extern int __mntns_get_root_fd(pid_t pid);
extern int mntns_get_root_fd(struct ns_id *ns);
diff --git a/criu/mount.c b/criu/mount.c
index 22497f52e067..59fd17870db8 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2249,7 +2249,6 @@ static int do_umount_one(struct mount_info *mi)
* moved to the right places after restoring all mounts.
*/
-static inline int print_ns_root(struct ns_id *ns, int remap_id, char *buf, int bs);
static int get_mp_mountpoint(char *mountpoint, struct mount_info *mi, char *root, int root_len);
static LIST_HEAD(mnt_remap_list);
@@ -2455,7 +2454,7 @@ void mnt_entry_free(struct mount_info *mi)
* Helper for getting a path to where the namespace's root
* is re-constructed.
*/
-static inline int print_ns_root(struct ns_id *ns, int remap_id, char *buf, int bs)
+int print_ns_root(struct ns_id *ns, int remap_id, char *buf, int bs)
{
return snprintf(buf, bs, "%s/%d-%010d", mnt_roots, ns->id, remap_id);
}
--
2.7.5
More information about the CRIU
mailing list