Merge pull request #612 from tmm1/fix-typo

fix minor typo in disk_windows
tags/v2.18.11
Lomanic 7 years ago committed by GitHub
commit 3b882b034c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,7 +15,7 @@ var (
procGetDiskFreeSpaceExW = common.Modkernel32.NewProc("GetDiskFreeSpaceExW") procGetDiskFreeSpaceExW = common.Modkernel32.NewProc("GetDiskFreeSpaceExW")
procGetLogicalDriveStringsW = common.Modkernel32.NewProc("GetLogicalDriveStringsW") procGetLogicalDriveStringsW = common.Modkernel32.NewProc("GetLogicalDriveStringsW")
procGetDriveType = common.Modkernel32.NewProc("GetDriveTypeW") procGetDriveType = common.Modkernel32.NewProc("GetDriveTypeW")
provGetVolumeInformation = common.Modkernel32.NewProc("GetVolumeInformationW") procGetVolumeInformation = common.Modkernel32.NewProc("GetVolumeInformationW")
) )
var ( var (
@ -100,7 +100,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
lpFileSystemFlags := int64(0) lpFileSystemFlags := int64(0)
lpFileSystemNameBuffer := make([]byte, 256) lpFileSystemNameBuffer := make([]byte, 256)
volpath, _ := windows.UTF16PtrFromString(string(v) + ":/") volpath, _ := windows.UTF16PtrFromString(string(v) + ":/")
driveret, _, err := provGetVolumeInformation.Call( driveret, _, err := procGetVolumeInformation.Call(
uintptr(unsafe.Pointer(volpath)), uintptr(unsafe.Pointer(volpath)),
uintptr(unsafe.Pointer(&lpVolumeNameBuffer[0])), uintptr(unsafe.Pointer(&lpVolumeNameBuffer[0])),
uintptr(len(lpVolumeNameBuffer)), uintptr(len(lpVolumeNameBuffer)),

Loading…
Cancel
Save