gopsutil icon indicating copy to clipboard operation
gopsutil copied to clipboard

[disk][windows] Support LabelWithContext & SerialNumberWithContext

Open 56KBs opened this issue 3 years ago • 1 comments

Add support for LabelWithContext & SerialNumberWithContext, additionally returning this data back for the IOCountersWithContext function.

56KBs avatar Mar 11 '22 16:03 56KBs

memo: GetVolumeInformationW

I can confirm this works like a charm on my Windows 11 and passes all tests under disk package.

=== RUN   TestDisk_io_counters
    disk_test.go:63: C: {"readCount":508079,"mergedReadCount":0,"writeCount":457016,"mergedWriteCount":0,"readBytes":28458717184,"writeBytes":10429160960,"readTime":947,"writeTime":174,"iopsInProgress":0,"ioTime":0,"weightedIO":0,"name":"C:","serialNumber":"3223359191","label":"OS"}

However, the github test have been failed. Do you have any idea about why the test failed?

shirou avatar Mar 12 '22 12:03 shirou