mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
tools/libxl: Initialise the fd of the unused half of a datacopier
This bug causes a spurious failure if stdin happens to be an appropriately readable/writeable pipe which receives a POLLHUP Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> CC: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
2909ad4c96
commit
21d9b079e5
2 files changed
+2
No files matched your search
@@ -609,6 +609,7 @@ static void write_emulator_blob(libxl__egc *egc,
|
||||
dc->ao = stream->ao;
|
||||
dc->writewhat = "qemu save file";
|
||||
dc->writefd = writefd;
|
||||
dc->readfd = -1;
|
||||
dc->maxsz = -1;
|
||||
dc->callback = write_emulator_done;
|
||||
|
||||
|
||||
@@ -387,6 +387,7 @@ static void write_emulator_record(libxl__egc *egc,
|
||||
dc->ao = stream->ao;
|
||||
dc->readwhat = "qemu save file";
|
||||
dc->readfd = readfd;
|
||||
dc->writefd = -1;
|
||||
dc->maxsz = -1;
|
||||
dc->readbuf = stream->emu_body + sizeof(*ehdr);
|
||||
dc->bytes_to_read = rec->length - sizeof(*ehdr);
|
||||
|
||||