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>
This commit is contained in:
Michael Roth 2018-10-07 14:02:22 +03:00
parent ebc88c0ecf
commit a2c1ac4e22
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}