Commit 26f1af0a authored by Eduardo Habkost's avatar Eduardo Habkost Committed by Anthony Liguori
Browse files

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: default avatarEduardo Habkost <>
Signed-off-by: default avatarAnthony Liguori <>
parent d82ca915
......@@ -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;
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment