aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2013-06-24 08:39:47 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2013-06-28 22:10:33 +0400
commite859eda58501cd20a2e6988fb4acc1756bc4d278 (patch)
treefd181169af942af7f173d60916a918cb41138142
parentd1ec72a44e0a167f9e8254d6d1098d27f104571f (diff)
qemu-char: check optional fields using has_*
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-rw-r--r--qemu-char.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/qemu-char.c b/qemu-char.c
index a030e6b01e..a538217b00 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -3493,7 +3493,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp)
{
HANDLE out;
- if (file->in) {
+ if (file->has_in) {
error_setg(errp, "input file not supported");
return NULL;
}
@@ -3544,7 +3544,7 @@ static CharDriverState *qmp_chardev_open_file(ChardevFile *file, Error **errp)
return NULL;
}
- if (file->in) {
+ if (file->has_in) {
flags = O_RDONLY;
in = qmp_chardev_open_file_source(file->in, flags, errp);
if (error_is_set(errp)) {