* [PATCH 0/2] qga-vss: Misc cleanup @ 2025-08-25 14:52 Kostiantyn Kostiuk 2025-08-25 14:52 ` [PATCH 1/2] qga-vss: Replace asserts with condition and report error Kostiantyn Kostiuk 2025-08-25 14:52 ` [PATCH 2/2] qga-vss: Remove unused dependencies Kostiantyn Kostiuk 0 siblings, 2 replies; 5+ messages in thread From: Kostiantyn Kostiuk @ 2025-08-25 14:52 UTC (permalink / raw) To: qemu-devel; +Cc: Michael Roth, Yan Vugenfirer, Kostiantyn Kostiuk Kostiantyn Kostiuk (2): qga-vss: Replace asserts with condition and report error qga-vss: Remove unused dependencies qga/vss-win32/meson.build | 4 +--- qga/vss-win32/requester.cpp | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) -- 2.50.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] qga-vss: Replace asserts with condition and report error 2025-08-25 14:52 [PATCH 0/2] qga-vss: Misc cleanup Kostiantyn Kostiuk @ 2025-08-25 14:52 ` Kostiantyn Kostiuk 2025-08-26 9:08 ` Yan Vugenfirer 2025-08-25 14:52 ` [PATCH 2/2] qga-vss: Remove unused dependencies Kostiantyn Kostiuk 1 sibling, 1 reply; 5+ messages in thread From: Kostiantyn Kostiuk @ 2025-08-25 14:52 UTC (permalink / raw) To: qemu-devel; +Cc: Michael Roth, Yan Vugenfirer, Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> --- qga/vss-win32/requester.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 4401d55e3a..bc260abb96 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -347,7 +347,12 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset) goto out; } - assert(pCreateVssBackupComponents != NULL); + if (!pCreateVssBackupComponents) { + err_set(errset, (HRESULT)ERROR_PROC_NOT_FOUND, + "CreateVssBackupComponents proc address absent. Did you call requester_init()?"); + goto out; + } + hr = pCreateVssBackupComponents(&vss_ctx.pVssbc); if (FAILED(hr)) { err_set(errset, hr, "failed to create VSS backup components"); @@ -579,8 +584,16 @@ void requester_thaw(int *num_vols, void *mountpints, ErrorSet *errset) /* Tell the provider that the snapshot is finished. */ SetEvent(vss_ctx.hEventThaw); - assert(vss_ctx.pVssbc); - assert(vss_ctx.pAsyncSnapshot); + if (!vss_ctx.pVssbc) { + err_set(errset, (HRESULT)VSS_E_BAD_STATE, + "CreateVssBackupComponents is missing. Did you freeze the volumes?"); + return; + } + if (!vss_ctx.pAsyncSnapshot) { + err_set(errset, (HRESULT)VSS_E_BAD_STATE, + "AsyncSnapshot set is missing. Did you freeze the volumes?"); + return; + } HRESULT hr = WaitForAsync(vss_ctx.pAsyncSnapshot); switch (hr) { -- 2.50.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] qga-vss: Replace asserts with condition and report error 2025-08-25 14:52 ` [PATCH 1/2] qga-vss: Replace asserts with condition and report error Kostiantyn Kostiuk @ 2025-08-26 9:08 ` Yan Vugenfirer 0 siblings, 0 replies; 5+ messages in thread From: Yan Vugenfirer @ 2025-08-26 9:08 UTC (permalink / raw) To: Kostiantyn Kostiuk; +Cc: qemu-devel, Michael Roth On Mon, Aug 25, 2025 at 5:52 PM Kostiantyn Kostiuk <kkostiuk@redhat.com> wrote: > > Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> > --- > qga/vss-win32/requester.cpp | 19 ++++++++++++++++--- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp > index 4401d55e3a..bc260abb96 100644 > --- a/qga/vss-win32/requester.cpp > +++ b/qga/vss-win32/requester.cpp > @@ -347,7 +347,12 @@ void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset) > goto out; > } > > - assert(pCreateVssBackupComponents != NULL); > + if (!pCreateVssBackupComponents) { > + err_set(errset, (HRESULT)ERROR_PROC_NOT_FOUND, > + "CreateVssBackupComponents proc address absent. Did you call requester_init()?"); > + goto out; > + } > + > hr = pCreateVssBackupComponents(&vss_ctx.pVssbc); > if (FAILED(hr)) { > err_set(errset, hr, "failed to create VSS backup components"); > @@ -579,8 +584,16 @@ void requester_thaw(int *num_vols, void *mountpints, ErrorSet *errset) > /* Tell the provider that the snapshot is finished. */ > SetEvent(vss_ctx.hEventThaw); > > - assert(vss_ctx.pVssbc); > - assert(vss_ctx.pAsyncSnapshot); > + if (!vss_ctx.pVssbc) { > + err_set(errset, (HRESULT)VSS_E_BAD_STATE, > + "CreateVssBackupComponents is missing. Did you freeze the volumes?"); > + return; > + } > + if (!vss_ctx.pAsyncSnapshot) { > + err_set(errset, (HRESULT)VSS_E_BAD_STATE, > + "AsyncSnapshot set is missing. Did you freeze the volumes?"); > + return; > + } > > HRESULT hr = WaitForAsync(vss_ctx.pAsyncSnapshot); > switch (hr) { > -- > 2.50.1 > Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] qga-vss: Remove unused dependencies 2025-08-25 14:52 [PATCH 0/2] qga-vss: Misc cleanup Kostiantyn Kostiuk 2025-08-25 14:52 ` [PATCH 1/2] qga-vss: Replace asserts with condition and report error Kostiantyn Kostiuk @ 2025-08-25 14:52 ` Kostiantyn Kostiuk 2025-08-26 5:29 ` Yan Vugenfirer 1 sibling, 1 reply; 5+ messages in thread From: Kostiantyn Kostiuk @ 2025-08-25 14:52 UTC (permalink / raw) To: qemu-devel; +Cc: Michael Roth, Yan Vugenfirer, Kostiantyn Kostiuk Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> --- qga/vss-win32/meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build index 0ac918910b..a6b810f12a 100644 --- a/qga/vss-win32/meson.build +++ b/qga/vss-win32/meson.build @@ -13,13 +13,11 @@ qga_vss = shared_module( link_args: link_args, vs_module_defs: 'qga-vss.def', dependencies: [ - glib, socket, cc.find_library('ole32'), cc.find_library('oleaut32'), cc.find_library('shlwapi'), - cc.find_library('uuid'), - cc.find_library('intl') + cc.find_library('uuid') ] ) -- 2.50.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] qga-vss: Remove unused dependencies 2025-08-25 14:52 ` [PATCH 2/2] qga-vss: Remove unused dependencies Kostiantyn Kostiuk @ 2025-08-26 5:29 ` Yan Vugenfirer 0 siblings, 0 replies; 5+ messages in thread From: Yan Vugenfirer @ 2025-08-26 5:29 UTC (permalink / raw) To: Kostiantyn Kostiuk; +Cc: qemu-devel, Michael Roth On Mon, Aug 25, 2025 at 5:52 PM Kostiantyn Kostiuk <kkostiuk@redhat.com> wrote: > > Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> > --- > qga/vss-win32/meson.build | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/qga/vss-win32/meson.build b/qga/vss-win32/meson.build > index 0ac918910b..a6b810f12a 100644 > --- a/qga/vss-win32/meson.build > +++ b/qga/vss-win32/meson.build > @@ -13,13 +13,11 @@ qga_vss = shared_module( > link_args: link_args, > vs_module_defs: 'qga-vss.def', > dependencies: [ > - glib, > socket, > cc.find_library('ole32'), > cc.find_library('oleaut32'), > cc.find_library('shlwapi'), > - cc.find_library('uuid'), > - cc.find_library('intl') > + cc.find_library('uuid') > ] > ) > > -- > 2.50.1 > Reviewed-by: Yan Vugenfirer <yvugenfi@redhat.com> ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-26 9:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-08-25 14:52 [PATCH 0/2] qga-vss: Misc cleanup Kostiantyn Kostiuk 2025-08-25 14:52 ` [PATCH 1/2] qga-vss: Replace asserts with condition and report error Kostiantyn Kostiuk 2025-08-26 9:08 ` Yan Vugenfirer 2025-08-25 14:52 ` [PATCH 2/2] qga-vss: Remove unused dependencies Kostiantyn Kostiuk 2025-08-26 5:29 ` Yan Vugenfirer
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).