diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2012-11-27 11:01:56 -0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2013-01-08 16:38:10 -0600 |
commit | 3ac4b7c51e3ba181a86983ba2601a595ed8f3b1d (patch) | |
tree | b46c973e0ad117861566c7ae67bfdc450c24659b /qga | |
parent | a9de6d01df3153b2ac0cade11e26a66d596d7166 (diff) |
qemu-ga: qmp_guest_file_close(): fix fclose() error check
fclose() returns EOF on error.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/commands-posix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index bbef66dc6a..ebb58be22e 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -170,7 +170,7 @@ void qmp_guest_file_close(int64_t handle, Error **err) } ret = fclose(gfh->fh); - if (ret == -1) { + if (ret == EOF) { error_set(err, QERR_QGA_COMMAND_FAILED, "fclose() failed"); return; } |