diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2011-11-10 10:41:44 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-12-12 11:47:19 -0600 |
commit | 26f1af0aa3db024349f6bb6ed7a0ac89052910bb (patch) | |
tree | 5461bd78ef6d593e42cb4af12f14df520d73305e /savevm.c | |
parent | d82ca915875ac55ba291435f7eb4fe7bfcb2cecb (diff) |
stdio_pclose: return -errno on error (v3)
This is what qemu_fclose() expects.
Changes v1 -> v2:
- On success, keep returning pclose() return value, instead of always 0.
Changes v2 -> v3:
- Add braces on if statements to match coding style
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'savevm.c')
-rw-r--r-- | savevm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -235,6 +235,9 @@ static int stdio_pclose(void *opaque) QEMUFileStdio *s = opaque; int ret; ret = pclose(s->stdio_file); + if (ret == -1) { + ret = -errno; + } g_free(s); return ret; } |