2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 08:45:49 +00:00

proc: Sanitize mountinfo parsing

Make the proc_mountinfo obtaned after parse form a single linked list.
That's much easier to handle and doesn't have an artificial limitation
of 64 items...

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-05-13 00:07:11 +04:00
parent f9d1f2b275
commit 5e593e9b57
3 changed files with 33 additions and 43 deletions

View File

@@ -91,9 +91,10 @@ struct proc_mountinfo {
unsigned int s_dev;
char root[64];
char mountpoint[64];
struct proc_mountinfo *next;
};
extern int parse_mountinfo(pid_t pid, struct proc_mountinfo *mi, int nr_elems);
extern struct proc_mountinfo *parse_mountinfo(pid_t pid);
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_smaps(pid_t pid, struct list_head *vma_area_list, bool use_map_files);