提交 3ac4b7c5 编写于 作者: L Luiz Capitulino 提交者: Michael Roth

qemu-ga: qmp_guest_file_close(): fix fclose() error check

fclose() returns EOF on error.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 a9de6d01
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册