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

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: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2015-04-14 17:35:16 +03:00
parent b56b4204d1
commit 11c4094c15
2 changed files with 4 additions and 1 deletions

View File

@@ -1678,6 +1678,8 @@ int cr_pre_dump_tasks(pid_t pid)
opts.final_state = TASK_ALIVE;
}
img_common_magic = true;
if (init_stats(DUMP_STATS))
goto err;
@@ -1769,6 +1771,8 @@ int cr_dump_tasks(pid_t pid)
int post_dump_ret = 0;
int ret = -1;
img_common_magic = true;
pr_info("========================================\n");
pr_info("Dumping processes (pid: %d)\n", pid);
pr_info("========================================\n");

View File

@@ -88,7 +88,6 @@ int write_img_inventory(void)
if (!img)
return -1;
img_common_magic = true;
he.img_version = CRTOOLS_IMAGES_V1_1;
he.fdinfo_per_id = true;
he.has_fdinfo_per_id = true;