aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r--qga/commands-posix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index 12bc086..5070f27 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -503,9 +503,8 @@ int64_t qmp_guest_file_open(const char *path, const char *mode,
/* set fd non-blocking to avoid common use cases (like reading from a
* named pipe) from hanging the agent
*/
- if (!g_unix_set_fd_nonblocking(fileno(fh), true, NULL)) {
+ if (!qemu_set_blocking(fileno(fh), false, errp)) {
fclose(fh);
- error_setg_errno(errp, errno, "Failed to set FD nonblocking");
return -1;
}