aboutsummaryrefslogtreecommitdiff
path: root/qga
diff options
context:
space:
mode:
Diffstat (limited to 'qga')
-rw-r--r--qga/vss-win32.c5
-rw-r--r--qga/vss-win32/requester.cpp2
-rw-r--r--qga/vss-win32/requester.h11
3 files changed, 9 insertions, 9 deletions
diff --git a/qga/vss-win32.c b/qga/vss-win32.c
index 0e4095736e..e1f539835c 100644
--- a/qga/vss-win32.c
+++ b/qga/vss-win32.c
@@ -150,9 +150,8 @@ void qga_vss_fsfreeze(int *nr_volume, Error **errp, bool freeze)
const char *func_name = freeze ? "requester_freeze" : "requester_thaw";
QGAVSSRequesterFunc func;
ErrorSet errset = {
- .error_set = (ErrorSetFunc)error_set_win32,
- .errp = (void **)errp,
- .err_class = ERROR_CLASS_GENERIC_ERROR
+ .error_setg_win32 = error_setg_win32,
+ .errp = errp,
};
func = (QGAVSSRequesterFunc)GetProcAddress(provider_lib, func_name);
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 922e74ddfc..b130fee934 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -24,7 +24,7 @@
#define VSS_TIMEOUT_EVENT_MSEC 10
#define err_set(e, err, fmt, ...) \
- ((e)->error_set((e)->errp, err, (e)->err_class, fmt, ## __VA_ARGS__))
+ ((e)->error_setg_win32((e)->errp, err, fmt, ## __VA_ARGS__))
#define err_is_set(e) ((e)->errp && *(e)->errp)
diff --git a/qga/vss-win32/requester.h b/qga/vss-win32/requester.h
index 374f9b8d16..0a8d048874 100644
--- a/qga/vss-win32/requester.h
+++ b/qga/vss-win32/requester.h
@@ -20,13 +20,14 @@
extern "C" {
#endif
+struct Error;
+
/* Callback to set Error; used to avoid linking glib to the DLL */
-typedef void (*ErrorSetFunc)(void **errp, int win32_err, int err_class,
- const char *fmt, ...) GCC_FMT_ATTR(4, 5);
+typedef void (*ErrorSetFunc)(struct Error **errp, int win32_err,
+ const char *fmt, ...) GCC_FMT_ATTR(3, 4);
typedef struct ErrorSet {
- ErrorSetFunc error_set;
- void **errp;
- int err_class;
+ ErrorSetFunc error_setg_win32;
+ struct Error **errp;
} ErrorSet;
STDAPI requester_init(void);