diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-28 11:07:23 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2020-03-09 13:36:15 +0100 |
commit | 4c235193a2132a1d8e9bd78a21d90153c1f662ff (patch) | |
tree | 2430ebc3c6e339a1b76630fffff69e9e956a6c18 /chardev/char-pipe.c | |
parent | 67f17e23baca5dd545fe98b01169cc351a70fe35 (diff) |
chardev: Improve error report by calling error_setg_win32()
Use error_setg_win32() which adds a hint similar to strerror(errno)).
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200228100726.8414-2-philmd@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'chardev/char-pipe.c')
-rw-r--r-- | chardev/char-pipe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chardev/char-pipe.c b/chardev/char-pipe.c index 94d714ffcd..fd12c9e63b 100644 --- a/chardev/char-pipe.c +++ b/chardev/char-pipe.c @@ -70,7 +70,7 @@ static int win_chr_pipe_init(Chardev *chr, const char *filename, MAXCONNECT, NSENDBUF, NRECVBUF, NTIMEOUT, NULL); g_free(openname); if (s->file == INVALID_HANDLE_VALUE) { - error_setg(errp, "Failed CreateNamedPipe (%lu)", GetLastError()); + error_setg_win32(errp, GetLastError(), "Failed CreateNamedPipe"); s->file = NULL; goto fail; } |