qemu/qga/vss-win32
Kostiantyn Kostiuk e6ac36818a qga-vss: Write hex value of error in log
QGA-VSS writes error using error_setg_win32_internal,
which call g_win32_error_message.

g_win32_error_message - translate a Win32 error code
(as returned by GetLastError()) into the corresponding message.

In the same time, we call error_setg_win32_internal with
error codes from different Windows componets like VSS or
Performance monitor that provides different codes and
can't be converted with g_win32_error_message. In this
case, the empty suffix will be returned so error will be
masked.

This commit directly add hex value of error code.

Reproduce:
 - Run QGA command: {"execute": "guest-fsfreeze-freeze-list", "arguments": {"mountpoints": ["D:"]}}

QGA error example:
 - before changes:
  {"error": {"class": "GenericError", "desc": "failed to add D: to snapshot set: "}}
 - after changes:
  {"error": {"class": "GenericError", "desc": "failed to add D: to snapshot set: Windows error 0x8004230e: "}}

Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250825135311.138330-1-kkostiuk@redhat.com
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
(cherry picked from commit edf3780a7d)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2025-09-03 11:05:07 +03:00
..
install.cpp qga: fix missing static and prototypes windows warnings 2024-11-04 14:16:14 +02:00
install.h qemu-ga: Make QGA VSS provider service run only when needed 2017-04-26 23:56:46 -05:00
meson.build QGA VSS: Add wrapper to send log to debugger and stderr 2023-07-10 15:54:40 +03:00
provider.cpp qga: fix missing static and prototypes windows warnings 2024-11-04 14:16:14 +02:00
qga-vss.def qga/win32: Use rundll for VSS installation 2023-03-08 18:23:40 +02:00
qga-vss.idl qemu-ga: Add Windows VSS provider and requester as DLL 2013-09-09 14:17:57 -05:00
requester.cpp qga-vss: Write hex value of error in log 2025-09-03 11:05:07 +03:00
requester.h Replace GCC_FMT_ATTR with G_GNUC_PRINTF 2022-03-22 14:40:51 +04:00
vss-common.h qga/vss-win32: check old VSS SDK headers 2022-03-15 11:26:20 +01:00
vss-debug.cpp QGA VSS: Add wrapper to send log to debugger and stderr 2023-07-10 15:54:40 +03:00
vss-debug.h QGA VSS: Add wrapper to send log to debugger and stderr 2023-07-10 15:54:40 +03:00
vss-handles.h qga/win/vss: query VSS backup type 2023-03-08 18:26:49 +02:00