From 797be573ee5a2bae6f3f66251685178c1b0d24f7 Mon Sep 17 00:00:00 2001 From: Kevin Parsons Date: Mon, 14 Aug 2023 23:11:37 -0700 Subject: [PATCH] computestorage: Fix incorrect syscall in DestroyLayer HcsDestoryLayer -> HcsDestroyLayer Signed-off-by: Kevin Parsons --- computestorage/storage.go | 2 +- computestorage/zsyscall_windows.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/computestorage/storage.go b/computestorage/storage.go index 82d68cb8b1..c38d3aa5a9 100644 --- a/computestorage/storage.go +++ b/computestorage/storage.go @@ -11,7 +11,7 @@ import ( //sys hcsImportLayer(layerPath string, sourceFolderPath string, layerData string) (hr error) = computestorage.HcsImportLayer? //sys hcsExportLayer(layerPath string, exportFolderPath string, layerData string, options string) (hr error) = computestorage.HcsExportLayer? -//sys hcsDestroyLayer(layerPath string) (hr error) = computestorage.HcsDestoryLayer? +//sys hcsDestroyLayer(layerPath string) (hr error) = computestorage.HcsDestroyLayer? //sys hcsSetupBaseOSLayer(layerPath string, handle windows.Handle, options string) (hr error) = computestorage.HcsSetupBaseOSLayer? //sys hcsInitializeWritableLayer(writableLayerPath string, layerData string, options string) (hr error) = computestorage.HcsInitializeWritableLayer? //sys hcsAttachLayerStorageFilter(layerPath string, layerData string) (hr error) = computestorage.HcsAttachLayerStorageFilter? diff --git a/computestorage/zsyscall_windows.go b/computestorage/zsyscall_windows.go index 9cf479181a..b996b35e6b 100644 --- a/computestorage/zsyscall_windows.go +++ b/computestorage/zsyscall_windows.go @@ -43,7 +43,7 @@ var ( modcomputestorage = windows.NewLazySystemDLL("computestorage.dll") procHcsAttachLayerStorageFilter = modcomputestorage.NewProc("HcsAttachLayerStorageFilter") - procHcsDestoryLayer = modcomputestorage.NewProc("HcsDestoryLayer") + procHcsDestroyLayer = modcomputestorage.NewProc("HcsDestroyLayer") procHcsDetachLayerStorageFilter = modcomputestorage.NewProc("HcsDetachLayerStorageFilter") procHcsExportLayer = modcomputestorage.NewProc("HcsExportLayer") procHcsFormatWritableLayerVhd = modcomputestorage.NewProc("HcsFormatWritableLayerVhd") @@ -93,11 +93,11 @@ func hcsDestroyLayer(layerPath string) (hr error) { } func _hcsDestroyLayer(layerPath *uint16) (hr error) { - hr = procHcsDestoryLayer.Find() + hr = procHcsDestroyLayer.Find() if hr != nil { return } - r0, _, _ := syscall.Syscall(procHcsDestoryLayer.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0) + r0, _, _ := syscall.Syscall(procHcsDestroyLayer.Addr(), 1, uintptr(unsafe.Pointer(layerPath)), 0, 0) if int32(r0) < 0 { if r0&0x1fff0000 == 0x00070000 { r0 &= 0xffff