Skip to content

Commit

Permalink
DeviceIoControl add missing parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed Dec 9, 2023
1 parent 489d72c commit ccbe111
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libnw/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,14 @@ PrintIsSsd(PNODE node, PHY_DRIVE_INFO* info, DWORD index)
{
if (NWLC->NwOsInfo.dwMajorVersion >= 6)
{
DWORD dwBytes;
STORAGE_PROPERTY_QUERY propQuery = { .QueryType = PropertyStandardQuery, .PropertyId = StorageDeviceSeekPenaltyProperty };
DEVICE_SEEK_PENALTY_DESCRIPTOR dspd = { 0 };
HANDLE hDisk = NWL_GetDiskHandleById(FALSE, FALSE, index);
if (hDisk && hDisk != INVALID_HANDLE_VALUE)
{
if (DeviceIoControl(hDisk, IOCTL_STORAGE_QUERY_PROPERTY, &propQuery, sizeof(propQuery),
&dspd, sizeof(dspd), NULL, NULL))
&dspd, sizeof(dspd), &dwBytes, NULL))
{
NWL_NodeAttrSetBool(node, "SSD", (dspd.IncursSeekPenalty == FALSE), 0);
CloseHandle(hDisk);
Expand Down
2 changes: 1 addition & 1 deletion libnw/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define NWINFO_MAJOR_VERSION 0
#define NWINFO_MINOR_VERSION 9
#define NWINFO_MICRO_VERSION 2
#define NWINFO_BUILD_VERSION 0
#define NWINFO_BUILD_VERSION 1

#define NWINFO_VERSION NWINFO_MAJOR_VERSION,NWINFO_MINOR_VERSION,NWINFO_MICRO_VERSION,NWINFO_BUILD_VERSION
#define NWINFO_VERSION_STR QUOTE(NWINFO_MAJOR_VERSION.NWINFO_MINOR_VERSION.NWINFO_MICRO_VERSION.NWINFO_BUILD_VERSION)
Expand Down

0 comments on commit ccbe111

Please sign in to comment.