wxx: Fix handling of files used for character devices
authorStefan Weil <sw@weilnetz.de>
Tue, 2 Aug 2016 05:14:37 +0000 (07:14 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 5 Aug 2016 13:15:14 +0000 (14:15 +0100)
commitc025f689a13d1301b277ee4a0914e90810982d24
tree1db270701b657b0e20022adc963db1af394ed65a
parentbd8eda537fbe6f28a94db30e8facab2bf528b204
wxx: Fix handling of files used for character devices

On Windows, such files were not truncated like on all other hosts.
Now we also test whether truncation is needed when running on Windows.

The append case was also incorrect because it needs a different value
for the desired access mode.

Reported-by: Benjamin David Lunt <fys@fysnet.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1470114877-1466-1-git-send-email-sw@weilnetz.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
qemu-char.c