mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-04 16:25:31 +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:
@@ -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)
|
|||||||
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");
|
||||||
|
1
image.c
1
image.c
@@ -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;
|
||||||
|
Reference in New Issue
Block a user