From 9829dbfdeb8320d0ef6dbbc6cf98cc1432c3b87c Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 18 Apr 2012 15:42:26 +0400 Subject: [PATCH] rst: Add abstract rst_info on pstree_item The plan is to put collected resources on this to avoid seeking the image. Signed-off-by: Pavel Emelyanov --- cr-restore.c | 4 ++++ include/crtools.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/cr-restore.c b/cr-restore.c index 5faacda13..49c42d774 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -219,6 +219,10 @@ static int prepare_pstree(void) if (pi == NULL) break; + pi->rst = xzalloc(sizeof(*pi->rst)); + if (pi->rst == NULL) + break; + pi->pid = e.pid; pi->pgid = e.pgid; pi->sid = e.sid; diff --git a/include/crtools.h b/include/crtools.h index a5903fbe3..7bf44509b 100644 --- a/include/crtools.h +++ b/include/crtools.h @@ -181,6 +181,9 @@ struct vma_area { #define vma_area_is(vma_area, s) vma_entry_is(&((vma_area)->vma), s) #define vma_area_len(vma_area) vma_entry_len(&((vma_area)->vma)) +struct rst_info { +}; + struct pstree_item { struct list_head list; pid_t pid; /* leader pid */ @@ -192,6 +195,7 @@ struct pstree_item { int nr_threads; /* number of threads */ u32 *threads; /* array of threads */ u32 *children; /* array of children */ + struct rst_info *rst; }; static inline int in_vma_area(struct vma_area *vma, unsigned long addr)