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

pipes: move struct pipe_info declaration to pipes.h

AutoFS will need to create write pipe end file descriptor, if it was closed.
Thus, pipe_info structure have to be exported.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Stanislav Kinsburskiy
2016-01-27 15:04:31 +03:00
committed by Pavel Emelyanov
parent cae94b76f1
commit 2f70a79eac
2 changed files with 18 additions and 17 deletions

View File

@@ -2,6 +2,7 @@
#define __CR_PIPES_H__
#include "protobuf/pipe-data.pb-c.h"
#include "protobuf/pipe.pb-c.h"
extern struct collect_image_info pipe_cinfo;
extern int collect_pipes(void);
@@ -36,4 +37,21 @@ struct pipe_data_rst {
extern int collect_pipe_data(int img_type, struct pipe_data_rst **hash);
extern int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst **hash);
/*
* The sequence of objects which should be restored:
* pipe -> files struct-s -> fd-s.
* pipe_entry describes pipe's file structs-s.
* A pipe doesn't have own properties, so it has no object.
*/
struct pipe_info {
PipeEntry *pe;
struct list_head pipe_list; /* All pipe_info with the same pipe_id
* This is pure circular list without head */
struct list_head list; /* list head for fdinfo_list_entry-s */
struct file_desc d;
unsigned int create : 1,
reopen : 1;
};
#endif /* __CR_PIPES_H__ */

17
pipes.c
View File

@@ -15,23 +15,6 @@
#include "protobuf/pipe.pb-c.h"
#include "protobuf/pipe-data.pb-c.h"
/*
* The sequence of objects which should be restored:
* pipe -> files struct-s -> fd-s.
* pipe_entry describes pipe's file structs-s.
* A pipe doesn't have own properties, so it has no object.
*/
struct pipe_info {
PipeEntry *pe;
struct list_head pipe_list; /* All pipe_info with the same pipe_id
* This is pure circular list without head */
struct list_head list; /* list head for fdinfo_list_entry-s */
struct file_desc d;
unsigned int create : 1,
reopen : 1;
};
static LIST_HEAD(pipes);
static void show_saved_pipe_fds(struct pipe_info *pi)