2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +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:
Tikhomirov Pavel
2013-12-17 19:27:02 +04:00
committed by Pavel Emelyanov
parent c49219bf6a
commit 632798b789

View File

@@ -295,7 +295,7 @@ int open_pages_image_at(int dfd, unsigned long flags, int pm_fd)
{
unsigned id;
if (flags == O_RDONLY) {
if (flags == O_RDONLY || flags == O_RDWR) {
PagemapHead *h;
if (pb_read_one(pm_fd, &h, PB_PAGEMAP_HEAD) < 0)
return -1;