mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 23:05:39 +00:00
Beautify files.h
- add argument names - align members - add extern kw - group struct decl. on top - make file_desc_ops::type being unsigned integer similar to fdtype_ops::type Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
cb74aa3e48
commit
3c18a9f47e
@@ -7,6 +7,11 @@
|
|||||||
#include "list.h"
|
#include "list.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
|
||||||
|
struct pstree_item;
|
||||||
|
struct file_desc;
|
||||||
|
struct cr_fdset;
|
||||||
|
struct rst_info;
|
||||||
|
|
||||||
struct fd_parms {
|
struct fd_parms {
|
||||||
int fd;
|
int fd;
|
||||||
unsigned long pos;
|
unsigned long pos;
|
||||||
@@ -37,9 +42,9 @@ struct fdinfo_list_entry {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct file_desc_ops {
|
struct file_desc_ops {
|
||||||
int type;
|
unsigned int type;
|
||||||
int (*open)(struct file_desc *);
|
int (*open)(struct file_desc *d);
|
||||||
int (*want_transport)(struct fdinfo_entry *, struct file_desc *);
|
int (*want_transport)(struct fdinfo_entry *fe, struct file_desc *d);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct file_desc {
|
struct file_desc {
|
||||||
@@ -56,26 +61,26 @@ struct fdtype_ops {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern u32 make_gen_id(const struct fd_parms *p);
|
extern u32 make_gen_id(const struct fd_parms *p);
|
||||||
struct cr_fdset;
|
|
||||||
extern int do_dump_gen_file(struct fd_parms *p, int lfd,
|
extern int do_dump_gen_file(struct fd_parms *p, int lfd,
|
||||||
const struct fdtype_ops *ops, const struct cr_fdset *cr_fdset);
|
const struct fdtype_ops *ops,
|
||||||
|
const struct cr_fdset *cr_fdset);
|
||||||
|
|
||||||
extern void file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops);
|
extern void file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops);
|
||||||
extern struct fdinfo_list_entry *file_master(struct file_desc *d);
|
extern struct fdinfo_list_entry *file_master(struct file_desc *d);
|
||||||
extern struct file_desc *find_file_desc_raw(int type, u32 id);
|
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 send_fd_to_peer(int fd, struct fdinfo_list_entry *fle, int transport);
|
||||||
struct pstree_item;
|
extern int restore_fown(int fd, fown_t *fown);
|
||||||
extern int prepare_fds(struct pstree_item *);
|
extern int rst_file_params(int fd, fown_t *fown, int flags);
|
||||||
struct rst_info;
|
|
||||||
extern int prepare_fd_pid(int pid, struct rst_info *);
|
extern void show_saved_files(void);
|
||||||
|
|
||||||
|
extern int prepare_fds(struct pstree_item *me);
|
||||||
|
extern int prepare_fd_pid(int pid, struct rst_info *rst_info);
|
||||||
extern int prepare_shared_fdinfo(void);
|
extern int prepare_shared_fdinfo(void);
|
||||||
extern int get_filemap_fd(int pid, struct vma_entry *vma_entry);
|
extern int get_filemap_fd(int pid, struct vma_entry *vma_entry);
|
||||||
extern int prepare_fs(int pid);
|
extern int prepare_fs(int pid);
|
||||||
int set_fd_flags(int fd, int flags);
|
extern int set_fd_flags(int fd, int flags);
|
||||||
|
|
||||||
extern int self_exe_fd;
|
extern int self_exe_fd;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user