From f9223cd827a91b8c4a2791d5b421affb2ac11cb6 Mon Sep 17 00:00:00 2001 From: fgma Date: Thu, 12 Nov 2020 19:31:00 +0100 Subject: [PATCH 1/3] vss: fix DeleteSnapshots() and GetSnapshotProperties() on 386 --- internal/fs/vss_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/fs/vss_windows.go b/internal/fs/vss_windows.go index e24dade80..8cee09fb1 100644 --- a/internal/fs/vss_windows.go +++ b/internal/fs/vss_windows.go @@ -482,7 +482,7 @@ func (vss *IVssBackupComponents) DeleteSnapshots(snapshotID ole.GUID) (int32, ol var result uintptr = 0 if runtime.GOARCH == "386" { - id := (*[4]uintptr)(unsafe.Pointer(ole.IID_NULL)) + id := (*[4]uintptr)(unsafe.Pointer(&snapshotID)) result, _, _ = syscall.Syscall9(vss.getVTable().deleteSnapshots, 9, uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3], @@ -506,7 +506,7 @@ func (vss *IVssBackupComponents) GetSnapshotProperties(snapshotID ole.GUID, var result uintptr = 0 if runtime.GOARCH == "386" { - id := (*[4]uintptr)(unsafe.Pointer(ole.IID_NULL)) + id := (*[4]uintptr)(unsafe.Pointer(&snapshotID)) result, _, _ = syscall.Syscall6(vss.getVTable().getSnapshotProperties, 6, uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3], From 859d89b032b446e6483ee2ec08d1798a89c684aa Mon Sep 17 00:00:00 2001 From: fgma Date: Thu, 12 Nov 2020 19:38:22 +0100 Subject: [PATCH 2/3] vss: add changelog file for issue 3090 --- changelog/unreleased/issue-3090 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 changelog/unreleased/issue-3090 diff --git a/changelog/unreleased/issue-3090 b/changelog/unreleased/issue-3090 new file mode 100644 index 000000000..249342127 --- /dev/null +++ b/changelog/unreleased/issue-3090 @@ -0,0 +1,6 @@ +Bugfix: --use-fs-snapshot failed on windows/386 + +restic failed to create VSS snapshots on windows/386 because of invalid API calls. + +https://github.com/restic/restic/issues/3087 +https://github.com/restic/restic/pull/3090 From 88208c3db27da33ab9141f10abf384b7a9045221 Mon Sep 17 00:00:00 2001 From: fgma Date: Fri, 13 Nov 2020 21:13:17 +0100 Subject: [PATCH 3/3] vss: improved changelog entry --- changelog/unreleased/issue-3090 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog/unreleased/issue-3090 b/changelog/unreleased/issue-3090 index 249342127..f42535c1a 100644 --- a/changelog/unreleased/issue-3090 +++ b/changelog/unreleased/issue-3090 @@ -1,6 +1,7 @@ -Bugfix: --use-fs-snapshot failed on windows/386 +Bugfix: --use-fs-snapshot now works on windows/386 -restic failed to create VSS snapshots on windows/386 because of invalid API calls. +Restic failed to create VSS snapshots on windows/386 with the following error: +"GetSnapshotProperties() failed: E_INVALIDARG (0x80070057)". This is fixed now. https://github.com/restic/restic/issues/3087 https://github.com/restic/restic/pull/3090