2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

proc: Add parse_mountinfo helper

To restore inotify we need to know the
mount point device numbers, so this helper
parses /proc/pid/mountinfo file for that.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-05-04 13:38:00 +04:00
committed by Pavel Emelyanov
parent 3399650a9c
commit 9ea069d2c9
3 changed files with 52 additions and 0 deletions

View File

@@ -85,6 +85,14 @@ struct proc_status_creds {
unsigned int cap_bnd[PROC_CAP_SIZE];
};
struct proc_mountinfo {
int mnt_id;
int parent_mnt_id;
unsigned int s_dev;
char mnt_root[64];
};
extern int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems);
extern int parse_pid_stat(pid_t pid, struct proc_pid_stat *s);
extern int parse_pid_stat_small(pid_t pid, struct proc_pid_stat_small *s);
extern int parse_maps(pid_t pid, struct list_head *vma_area_list, bool use_map_files);