Fix some issues with QEMUFile
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 13 Oct 2008 03:07:56 +0000 (03:07 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 13 Oct 2008 03:07:56 +0000 (03:07 +0000)
commit871d2f079661323a7645b388eb5ae8d7eeb3117c
treee7f554ea48fd462199e312911d391061e2762fdb
parent7526aa2d0082558bc4e89dab9f7a37b0d509a71a
Fix some issues with QEMUFile

This patch allows QEMUFile's read and write operations to return
negative error codes.  This is necessary to detect things like closed
streams during live migration.

It also removes unused code for QEMUFileFD write path.  Finally, it
makes sure to avoid attempting to flush an output buffer if the file
is only being used for input.  This was spotted by Uri Lublin.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5474 c046a42c-6fe2-441c-8c8c-71466251a162
hw/hw.h
vl.c