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

files: Don't fail on missing fs.img for zombies

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2014-07-04 15:52:29 +04:00
parent e2ab347415
commit 49f27969f5

11
files.c
View File

@@ -1077,9 +1077,13 @@ int prepare_fs_pid(struct pstree_item *item)
int ifd;
FsEntry *fe;
ifd = open_image(CR_FD_FS, O_RSTR, pid);
if (ifd < 0)
goto out;
ifd = open_image(CR_FD_FS, O_RSTR | O_OPT, pid);
if (ifd < 0) {
if (ifd == -ENOENT)
goto ok;
else
goto out;
}
if (pb_read_one(ifd, &fe, PB_FS) < 0)
goto out_i;
@@ -1102,6 +1106,7 @@ int prepare_fs_pid(struct pstree_item *item)
ri->umask = fe->umask;
fs_entry__free_unpacked(fe, NULL);
ok:
return 0;
out_f: