2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

file: Factor out fowners and flags restore

This is common, that opened fd fix its fowner and flags. Make
a cuntion for this. Those that obtain fd with open() don't need
to restore flags though.

A thought -- do we need yet another abstraction between fdinfo and
type-d files?

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-04-26 14:03:49 +04:00
parent 1f94837afb
commit 3b0a8e7c81
4 changed files with 17 additions and 19 deletions

View File

@@ -56,6 +56,7 @@ extern struct fdinfo_list_entry *file_master(struct file_desc *d);
extern struct file_desc *find_file_desc_raw(int type, u32 id);
extern int send_fd_to_peer(int fd, struct fdinfo_list_entry *, int transport);
extern int restore_fown(int fd, fown_t *fown);
int rst_file_params(int fd, fown_t *fown, int flags);
void show_saved_files(void);
extern int collect_reg_files(void);