mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-05 00:35:23 +00:00
files: Compact the code by removing per-file dump helpers
Since *all* of them just call do_dump_gen_file with proper ops, just call one directly. Compacts the code. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -212,16 +212,11 @@ int dump_one_ns_file(int lfd, u32 id, const struct fd_parms *p)
|
||||
return pb_write_one(fd, &nfe, PB_NS_FILES);
|
||||
}
|
||||
|
||||
static const struct fdtype_ops nsfile_ops = {
|
||||
const struct fdtype_ops nsfile_dump_ops = {
|
||||
.type = FD_TYPES__NS,
|
||||
.dump = dump_one_ns_file,
|
||||
};
|
||||
|
||||
int dump_ns_file(struct fd_parms *p, int lfd, const int fdinfo)
|
||||
{
|
||||
return do_dump_gen_file(p, lfd, &nsfile_ops, fdinfo);
|
||||
}
|
||||
|
||||
struct ns_file_info {
|
||||
struct file_desc d;
|
||||
NsFileEntry *nfe;
|
||||
|
Reference in New Issue
Block a user