mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 14:55:39 +00:00
v3 Fix for open_pages_image_at to read if opened with O_RDWR
Signed-off-by: Tikhomirov Pavel <snorcht@gmail.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
c49219bf6a
commit
632798b789
2
image.c
2
image.c
@@ -295,7 +295,7 @@ int open_pages_image_at(int dfd, unsigned long flags, int pm_fd)
|
|||||||
{
|
{
|
||||||
unsigned id;
|
unsigned id;
|
||||||
|
|
||||||
if (flags == O_RDONLY) {
|
if (flags == O_RDONLY || flags == O_RDWR) {
|
||||||
PagemapHead *h;
|
PagemapHead *h;
|
||||||
if (pb_read_one(pm_fd, &h, PB_PAGEMAP_HEAD) < 0)
|
if (pb_read_one(pm_fd, &h, PB_PAGEMAP_HEAD) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user