[CRIU] [PATCH cr 06/11] files: add some function in files.h

Andrey Vagin avagin at openvz.org
Thu Apr 5 12:02:10 EDT 2012


They will be used to restore pipes

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 files.c         |    7 +------
 include/files.h |    7 +++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/files.c b/files.c
index 1306498..a34f15d 100644
--- a/files.c
+++ b/files.c
@@ -299,7 +299,7 @@ struct fdinfo_list_entry *find_fdinfo_list_entry(int pid, int fd, struct list_he
 	return fle;
 }
 
-static inline void transport_name_gen(struct sockaddr_un *addr, int *len,
+void transport_name_gen(struct sockaddr_un *addr, int *len,
 		int pid, long fd)
 {
 	addr->sun_family = AF_UNIX;
@@ -308,11 +308,6 @@ static inline void transport_name_gen(struct sockaddr_un *addr, int *len,
 	*addr->sun_path = '\0';
 }
 
-static struct fdinfo_list_entry *file_master(struct list_head *fd_list)
-{
-	return list_first_entry(fd_list, struct fdinfo_list_entry, list);
-}
-
 static int open_transport_fd(int pid, struct fdinfo_entry *fe, struct list_head *fd_list)
 {
 	struct fdinfo_list_entry *fle;
diff --git a/include/files.h b/include/files.h
index d5e500b..1d9edad 100644
--- a/include/files.h
+++ b/include/files.h
@@ -39,6 +39,13 @@ struct fdinfo_list_entry {
 	futex_t			real_pid;
 };
 
+extern void transport_name_gen(struct sockaddr_un *addr,
+				int *len, int pid, long fd);
+static inline struct fdinfo_list_entry *file_master(struct list_head *fd_list)
+{
+	return list_first_entry(fd_list, struct fdinfo_list_entry, list);
+}
+
 void show_saved_files(void);
 extern int collect_reg_files(void);
 extern int prepare_fds(int pid);
-- 
1.7.1



More information about the CRIU mailing list