Skip to content

Commit

Permalink
ssd bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a1ive committed Nov 9, 2023
1 parent 2e0a4dd commit 468f7b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libnw/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ PrintIsSsd(PNODE node, PHY_DRIVE_INFO* info, DWORD index)
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 (hDisk && hDisk != INVALID_HANDLE_VALUE)
{
if (DeviceIoControl(hDisk, IOCTL_STORAGE_QUERY_PROPERTY, &propQuery, sizeof(propQuery),
&dspd, sizeof(dspd), NULL, NULL))
Expand Down

0 comments on commit 468f7b5

Please sign in to comment.