Commit 4816882d authored by Pavel Emelyanov's avatar Pavel Emelyanov

img: Add ability to check whether optional image collection happened

A bit later we'd need to check whether cinfo collector
opened an image or not due to file absense.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 1e3ae669
...@@ -49,6 +49,7 @@ struct collect_image_info { ...@@ -49,6 +49,7 @@ struct collect_image_info {
#define COLLECT_SHARED 0x1 /* use shared memory for obj-s */ #define COLLECT_SHARED 0x1 /* use shared memory for obj-s */
#define COLLECT_OPTIONAL 0x2 /* image file may be missing */ #define COLLECT_OPTIONAL 0x2 /* image file may be missing */
#define COLLECT_HAPPENED 0x4 /* image was opened and collected */
extern int collect_image(struct collect_image_info *); extern int collect_image(struct collect_image_info *);
......
...@@ -648,6 +648,7 @@ int collect_image(struct collect_image_info *cinfo) ...@@ -648,6 +648,7 @@ int collect_image(struct collect_image_info *cinfo)
return -1; return -1;
} }
cinfo->flags |= COLLECT_HAPPENED;
if (cinfo->flags & COLLECT_SHARED) { if (cinfo->flags & COLLECT_SHARED) {
o_alloc = shmalloc; o_alloc = shmalloc;
o_free = shfree_last; o_free = shfree_last;
......
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