jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

inaccurate disk size on windows #325

Open sspring opened 2 years ago

sspring commented 2 years ago

wmi report inaccurate disk size, refer : https://stackoverflow.com/questions/9901792/wmi-win32-diskdrive-to-get-total-sector-on-the-physical-disk-drive
replace Win32_DiskDrive with DeviceIOControl.

ffromani commented 1 year ago

thanks for this contribution @sspring ! could you please add a unit test to ensure this code doesn't regress? None of the active main contributors is a windows user, so this is especially important, as we rely on CI for correctness.