Merge pull request #3090 from fgma/vss-fix-386

vss: fix DeleteSnapshots() and GetSnapshotProperties() on 386
This commit is contained in:
Alexander Neumann 2020-11-13 21:30:34 +01:00 committed by GitHub
commit 04d1983800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,7 @@
Bugfix: --use-fs-snapshot now works on windows/386
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

View File

@ -482,7 +482,7 @@ func (vss *IVssBackupComponents) DeleteSnapshots(snapshotID ole.GUID) (int32, ol
var result uintptr = 0 var result uintptr = 0
if runtime.GOARCH == "386" { 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, result, _, _ = syscall.Syscall9(vss.getVTable().deleteSnapshots, 9,
uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3], 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 var result uintptr = 0
if runtime.GOARCH == "386" { 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, result, _, _ = syscall.Syscall6(vss.getVTable().getSnapshotProperties, 6,
uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3], uintptr(unsafe.Pointer(vss)), id[0], id[1], id[2], id[3],