aboutsummaryrefslogtreecommitdiff
path: root/qga
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2018-10-07 14:02:22 +0300
committerMichael Roth <mdroth@linux.vnet.ibm.com>2018-10-31 09:04:20 -0500
commita2c1ac4e22da848e0fef262086e0f29fbc6ff83a (patch)
tree2bbaa5ab9ea3bf5db0ca189b066c28dc9bb5b52b /qga
parentebc88c0ecf1ab8cb64cea9cf7973d05a12ed45e6 (diff)
qga-win: report specific error when failing to open channel
Useful in general, but especially now that errors might occur more frequently with --retry-path set. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga')
-rw-r--r--qga/channel-win32.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/qga/channel-win32.c b/qga/channel-win32.c
index b3597a8a0f..c86f4388db 100644
--- a/qga/channel-win32.c
+++ b/qga/channel-win32.c
@@ -302,7 +302,8 @@ static gboolean ga_channel_open(GAChannel *c, GAChannelMethod method,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING | FILE_FLAG_OVERLAPPED, NULL);
if (c->handle == INVALID_HANDLE_VALUE) {
- g_critical("error opening path %s", newpath);
+ g_critical("error opening path %s: %s", newpath,
+ g_win32_error_message(GetLastError()));
return false;
}