mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 21:07:43 +00:00
Instead of spreading regular files handling code over files.c and cr-dump.c move it to files-reg.c. This allows to extend regular file handling code in future without disturbing other source files and make code logically coupled, where files.c is mostly a place for general file handling code unrelated to file type specifics. While mostly it was code tossing there is some change I have to notice -- the structure ghost_file was previously declared in two paces cr-dump.c and files.c, in cr-dump.c it was used for dumping while in files.c it was used for restore. The structure had different members. So to resolve this conflict the ghost_file structure was renamed to ghost_file_dumpee. Nothing else is changed. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
17 lines
398 B
C
17 lines
398 B
C
#ifndef FILES_REG_H__
|
|
#define FILES_REG_H__
|
|
|
|
#include "types.h"
|
|
|
|
struct cr_fdset;
|
|
struct fd_parms;
|
|
|
|
extern int open_reg_by_id(u32 id);
|
|
extern void clear_ghost_files(void);
|
|
extern int collect_reg_files(void);
|
|
|
|
extern int dump_reg_file(struct fd_parms *p, int lfd, const struct cr_fdset *cr_fdset);
|
|
extern int dump_one_reg_file(int lfd, u32 id, const struct fd_parms *p);
|
|
|
|
#endif /* FILES_REG_H__ */
|