mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 22:35:33 +00:00
files: add some function in files.h
They will be used to restore pipes Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
f9ead29776
commit
216233d104
7
files.c
7
files.c
@@ -281,7 +281,7 @@ static int restore_exe_early(struct fdinfo_entry *fe, int fd)
|
||||
return reopen_fd_as(self_exe_fd, tmp);
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -290,11 +290,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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user