mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
Fix check for open_image() ret
When open_image() was modified to return a pointer rather than an int
in commit 295090c1, these two checks were overlooked and never fixed.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Andrew Vagin <avagin@odin.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
b17962ad8d
commit
8ac865f3ee
2 changed files with 2 additions and 2 deletions
|
|
@ -340,7 +340,7 @@ static int dump_ghost_file(int _fd, u32 id, const struct stat *st, dev_t phys_de
|
|||
pr_info("Dumping ghost file contents (id %#x)\n", id);
|
||||
|
||||
img = open_image(CR_FD_GHOST_FILE, O_DUMP, id);
|
||||
if (img < 0)
|
||||
if (!img)
|
||||
return -1;
|
||||
|
||||
gfe.uid = userns_uid(st->st_uid);
|
||||
|
|
|
|||
2
mount.c
2
mount.c
|
|
@ -2199,7 +2199,7 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
|
|||
char root[PATH_MAX] = ".";
|
||||
|
||||
img = open_image(CR_FD_MNTS, O_RSTR, nsid->id);
|
||||
if (img < 0)
|
||||
if (!img)
|
||||
return -1;
|
||||
|
||||
if (nsid->id != root_item->ids->mnt_ns_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue