2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

inventory: Kill inventory.img file in case of failed dump

This will result in more sane error in case restore is launched
on such semi-complete images.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-03-27 16:16:25 +04:00
parent c03a4c5801
commit cbf0ba9f48
3 changed files with 10 additions and 2 deletions

View File

@@ -86,6 +86,12 @@ int write_img_inventory(void)
return 0;
}
void kill_inventory(void)
{
unlinkat(get_service_fd(IMG_FD_OFF),
fdset_template[CR_FD_INVENTORY].fmt, 0);
}
static void show_inventory(int fd, struct cr_options *o)
{
pb_show_vertical(fd, PB_INVENTORY);