提交 26f1af0a 编写于 作者: E Eduardo Habkost 提交者: Anthony Liguori

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: NEduardo Habkost <ehabkost@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 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;
}
g_free(s);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册