Commit 632798b7 authored by Tikhomirov Pavel's avatar Tikhomirov Pavel Committed by Pavel Emelyanov

v3 Fix for open_pages_image_at to read if opened with O_RDWR

Signed-off-by: 's avatarTikhomirov Pavel <snorcht@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent c49219bf
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment