diff mbox series

[3/3] qga/win/vss: requester_freeze changes

Message ID 20230209085004.2745131-4-kfir@daynix.com
State New
Headers show
Series qga/win/vss: add VSS backup type options | expand

Commit Message

Kfir Manor Feb. 9, 2023, 8:50 a.m. UTC
Change requester_freeze so that the VSS backup type queried from the registry

Signed-off-by: Kfir Manor <kfir@daynix.com>
---
 qga/vss-win32/requester.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Konstantin Kostiuk Feb. 15, 2023, 10:23 a.m. UTC | #1
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Thu, Feb 9, 2023 at 2:50 AM Kfir Manor <kfir@daynix.com> wrote:

> Change requester_freeze so that the VSS backup type queried from the
> registry
>
> Signed-off-by: Kfir Manor <kfir@daynix.com>
> ---
>  qga/vss-win32/requester.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 27fdb9236b..163b3870b9 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -285,6 +285,7 @@ void requester_freeze(int *num_vols, void
> *mountpoints, ErrorSet *errset)
>      DWORD wait_status;
>      int num_fixed_drives = 0, i;
>      int num_mount_points = 0;
> +    VSS_BACKUP_TYPE vss_bt = get_vss_backup_type();
>
>      if (vss_ctx.pVssbc) { /* already frozen */
>          *num_vols = 0;
> @@ -332,7 +333,7 @@ void requester_freeze(int *num_vols, void
> *mountpoints, ErrorSet *errset)
>          goto out;
>      }
>
> -    hr = vss_ctx.pVssbc->SetBackupState(true, true, VSS_BT_FULL, false);
> +    hr = vss_ctx.pVssbc->SetBackupState(true, true, vss_bt, false);
>      if (FAILED(hr)) {
>          err_set(errset, hr, "failed to set backup state");
>          goto out;
> --
> 2.38.1
>
>
diff mbox series

Patch

diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 27fdb9236b..163b3870b9 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -285,6 +285,7 @@  void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
     DWORD wait_status;
     int num_fixed_drives = 0, i;
     int num_mount_points = 0;
+    VSS_BACKUP_TYPE vss_bt = get_vss_backup_type();
 
     if (vss_ctx.pVssbc) { /* already frozen */
         *num_vols = 0;
@@ -332,7 +333,7 @@  void requester_freeze(int *num_vols, void *mountpoints, ErrorSet *errset)
         goto out;
     }
 
-    hr = vss_ctx.pVssbc->SetBackupState(true, true, VSS_BT_FULL, false);
+    hr = vss_ctx.pVssbc->SetBackupState(true, true, vss_bt, false);
     if (FAILED(hr)) {
         err_set(errset, hr, "failed to set backup state");
         goto out;