Commit 2f70a79e authored by Stanislav Kinsburskiy's avatar Stanislav Kinsburskiy Committed by Pavel Emelyanov

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: 's avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent cae94b76
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define __CR_PIPES_H__ #define __CR_PIPES_H__
#include "protobuf/pipe-data.pb-c.h" #include "protobuf/pipe-data.pb-c.h"
#include "protobuf/pipe.pb-c.h"
extern struct collect_image_info pipe_cinfo; extern struct collect_image_info pipe_cinfo;
extern int collect_pipes(void); extern int collect_pipes(void);
...@@ -36,4 +37,21 @@ struct pipe_data_rst { ...@@ -36,4 +37,21 @@ struct pipe_data_rst {
extern int collect_pipe_data(int img_type, struct pipe_data_rst **hash); 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); 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__ */ #endif /* __CR_PIPES_H__ */
...@@ -15,23 +15,6 @@ ...@@ -15,23 +15,6 @@
#include "protobuf/pipe.pb-c.h" #include "protobuf/pipe.pb-c.h"
#include "protobuf/pipe-data.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 LIST_HEAD(pipes);
static void show_saved_pipe_fds(struct pipe_info *pi) static void show_saved_pipe_fds(struct pipe_info *pi)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment