2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00
criu/include/files.h
Pavel Emelyanov bac56b11c0 sockets: Remove statfs and 2nd stat from dump process
The statfs is not required, we now check for fd being a socket with S_IFSOCK.
The 2nd stat is just not needed, the caller provides stat info.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-03-29 16:40:10 +04:00

60 lines
990 B
C

#ifndef FILES_H_
#define FILES_H_
#include "compiler.h"
#include "types.h"
#include "lock.h"
#include "list.h"
#include "image.h"
struct fd_parms {
unsigned long fd_name;
unsigned long pos;
unsigned int flags;
unsigned int type;
struct stat stat;
u32 id;
pid_t pid;
};
enum fdinfo_states {
FD_STATE_PREP, /* Create unix sockets */
FD_STATE_CREATE, /* Create and send fd */
FD_STATE_RECV, /* Receive fd */
FD_STATE_MAX
};
struct fmap_fd {
struct fmap_fd *next;
unsigned long start;
int pid;
int fd;
};
struct fdinfo_desc {
u32 id;
u32 type;
u64 addr;
int pid;
futex_t real_pid;
futex_t users;
struct list_head list;
};
struct fdinfo_list_entry {
struct list_head list;
int fd;
int pid;
futex_t real_pid;
};
extern int prepare_fds(int pid);
extern int prepare_fd_pid(int pid);
extern int prepare_shared_fdinfo(void);
extern int get_filemap_fd(int pid, struct vma_entry *vma_entry);
extern int self_exe_fd;
#endif /* FILES_H_ */