Branch data Line data Source code
1 : : #ifndef __CR_PIPES_H__
2 : : #define __CR_PIPES_H__
3 : :
4 : : #include "protobuf/pipe-data.pb-c.h"
5 : :
6 : : extern struct collect_image_info pipe_cinfo;
7 : : extern int collect_pipes(void);
8 : : extern void mark_pipe_master(void);
9 : : extern const struct fdtype_ops pipe_dump_ops;
10 : :
11 : : static inline u32 pipe_id(const struct fd_parms *p)
12 : : {
13 : 1490 : return p->stat.st_ino;
14 : : }
15 : :
16 : : #define NR_PIPES_WITH_DATA 1024
17 : :
18 : : struct pipe_data_dump {
19 : : int img_type;
20 : : unsigned int nr;
21 : : u32 ids[NR_PIPES_WITH_DATA];
22 : : };
23 : :
24 : : extern int dump_one_pipe_data(struct pipe_data_dump *pd, int lfd, const struct fd_parms *p);
25 : :
26 : : struct pipe_data_rst {
27 : : PipeDataEntry *pde;
28 : : void *data;
29 : : struct pipe_data_rst *next;
30 : : };
31 : :
32 : : #define PIPE_DATA_HASH_BITS 5
33 : : #define PIPE_DATA_HASH_SIZE (1 << PIPE_DATA_HASH_BITS)
34 : : #define PIPE_DATA_HASH_MASK (PIPE_DATA_HASH_SIZE - 1)
35 : :
36 : : extern int collect_pipe_data(int img_type, struct pipe_data_rst **hash);
37 : : extern int restore_pipe_data(int img_type, int pfd, u32 id, struct pipe_data_rst **hash);
38 : :
39 : : #endif /* __CR_PIPES_H__ */
|