Brad Fitzpatrick would like Scott Crunkleton and Alex Brainman to review this change.
windows: make GetDriveType use GetDriveTypeW
Fixes golang/go#23121
Change-Id: I71495b82a573e9f492a52dde325522a6203c06eb
---
M windows/syscall_windows.go
M windows/zsyscall_windows.go
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/windows/syscall_windows.go b/windows/syscall_windows.go
index e0da2aa..1e9f4bb 100644
--- a/windows/syscall_windows.go
+++ b/windows/syscall_windows.go
@@ -248,7 +248,7 @@
//sys FindNextVolumeMountPoint(findVolumeMountPoint Handle, volumeMountPoint *uint16, bufferLength uint32) (err error) = FindNextVolumeMountPointW
//sys FindVolumeClose(findVolume Handle) (err error)
//sys FindVolumeMountPointClose(findVolumeMountPoint Handle) (err error)
-//sys GetDriveType(rootPathName *uint16) (driveType uint32)
+//sys GetDriveType(rootPathName *uint16) (driveType uint32) = GetDriveTypeW
//sys GetLogicalDrives() (drivesBitMask uint32, err error) [failretval==0]
//sys GetLogicalDriveStrings(bufferLength uint32, buffer *uint16) (n uint32, err error) [failretval==0] = GetLogicalDriveStringsW
//sys GetVolumeInformation(rootPathName *uint16, volumeNameBuffer *uint16, volumeNameSize uint32, volumeNameSerialNumber *uint32, maximumComponentLength *uint32, fileSystemFlags *uint32, fileSystemNameBuffer *uint16, fileSystemNameSize uint32) (err error) = GetVolumeInformationW
diff --git a/windows/zsyscall_windows.go b/windows/zsyscall_windows.go
index 6ad2c85..c7b3b15 100644
--- a/windows/zsyscall_windows.go
+++ b/windows/zsyscall_windows.go
@@ -186,7 +186,7 @@
procFindNextVolumeMountPointW = modkernel32.NewProc("FindNextVolumeMountPointW")
procFindVolumeClose = modkernel32.NewProc("FindVolumeClose")
procFindVolumeMountPointClose = modkernel32.NewProc("FindVolumeMountPointClose")
- procGetDriveType = modkernel32.NewProc("GetDriveType")
+ procGetDriveTypeW = modkernel32.NewProc("GetDriveTypeW")
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
procGetVolumeInformationW = modkernel32.NewProc("GetVolumeInformationW")
@@ -1962,7 +1962,7 @@
}
func GetDriveType(rootPathName *uint16) (driveType uint32) {
- r0, _, _ := syscall.Syscall(procGetDriveType.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
+ r0, _, _ := syscall.Syscall(procGetDriveTypeW.Addr(), 1, uintptr(unsafe.Pointer(rootPathName)), 0, 0)
driveType = uint32(r0)
return
}
To view, visit change 83855. To unsubscribe, or for help writing mail filters, visit settings.
Scott, you added this line in 0dd5e194bbf5eb84a39666eb4c98a4d007e4203a (https://go-review.googlesource.com/78235).
Patch set 1:Code-Review +2
Patch set 1:Run-TryBot +1
TryBots are happy.
Patch set 1:TryBot-Result +1
Brad Fitzpatrick merged this change.
windows: make GetDriveType use GetDriveTypeW
Fixes golang/go#23121
Change-Id: I71495b82a573e9f492a52dde325522a6203c06eb
Reviewed-on: https://go-review.googlesource.com/83855
Reviewed-by: Alex Brainman <alex.b...@gmail.com>
Run-TryBot: Brad Fitzpatrick <brad...@golang.org>
TryBot-Result: Gobot Gobot <go...@golang.org>