Commit 11c4094c authored by Pavel Emelyanov's avatar Pavel Emelyanov

img: Initialize "images are new" bool earlier

Doing it at inventory write time is too late. Other than this, inventory
isn't created for pre-dump, thus this one always generates v1 images.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b56b4204
...@@ -1678,6 +1678,8 @@ int cr_pre_dump_tasks(pid_t pid) ...@@ -1678,6 +1678,8 @@ int cr_pre_dump_tasks(pid_t pid)
opts.final_state = TASK_ALIVE; opts.final_state = TASK_ALIVE;
} }
img_common_magic = true;
if (init_stats(DUMP_STATS)) if (init_stats(DUMP_STATS))
goto err; goto err;
...@@ -1769,6 +1771,8 @@ int cr_dump_tasks(pid_t pid) ...@@ -1769,6 +1771,8 @@ int cr_dump_tasks(pid_t pid)
int post_dump_ret = 0; int post_dump_ret = 0;
int ret = -1; int ret = -1;
img_common_magic = true;
pr_info("========================================\n"); pr_info("========================================\n");
pr_info("Dumping processes (pid: %d)\n", pid); pr_info("Dumping processes (pid: %d)\n", pid);
pr_info("========================================\n"); pr_info("========================================\n");
......
...@@ -88,7 +88,6 @@ int write_img_inventory(void) ...@@ -88,7 +88,6 @@ int write_img_inventory(void)
if (!img) if (!img)
return -1; return -1;
img_common_magic = true;
he.img_version = CRTOOLS_IMAGES_V1_1; he.img_version = CRTOOLS_IMAGES_V1_1;
he.fdinfo_per_id = true; he.fdinfo_per_id = true;
he.has_fdinfo_per_id = true; he.has_fdinfo_per_id = true;
......
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