Skip to content

Commit 8cb5dac

Browse files
committed
HardwareDevices: Remove disk attribute description
1 parent 5a5734c commit 8cb5dac

File tree

5 files changed

+2
-158
lines changed

5 files changed

+2
-158
lines changed

plugins/HardwareDevices/HardwareDevices.rc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSM
180180
CAPTION "SMART"
181181
FONT 8, "MS Shell Dlg", 400, 0, 0x1
182182
BEGIN
183-
CONTROL "",IDC_DETAILS_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,0,1,309,193
184-
EDITTEXT IDC_EDIT1,0,207,309,58,ES_MULTILINE | ES_READONLY | WS_VSCROLL
185-
LTEXT "Description:",IDC_DESCRIPTION,0,196,39,8
183+
CONTROL "",IDC_DETAILS_LIST,"SysListView32",LVS_REPORT | LVS_ALIGNLEFT | WS_BORDER | WS_TABSTOP,0,1,309,264
186184
END
187185

188186
IDD_DISKDRIVE_DETAILS_FILESYSTEM DIALOGEX 0, 0, 309, 265

plugins/HardwareDevices/devices.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,6 @@ PWSTR SmartAttributeGetText(
846846
_In_ SMART_ATTRIBUTE_ID AttributeId
847847
);
848848

849-
PWSTR SmartAttributeGetDescription(
850-
_In_ SMART_ATTRIBUTE_ID AttributeId
851-
);
852-
853849
// diskgraph.c
854850

855851
VOID DiskDriveSysInfoInitializing(

plugins/HardwareDevices/diskdetails.c

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -696,32 +696,12 @@ INT_PTR CALLBACK DiskDriveSmartDetailsDlgProc(
696696

697697
dialogItem = PvAddPropPageLayoutItem(hwndDlg, hwndDlg, PH_PROP_PAGE_TAB_CONTROL_PARENT, PH_ANCHOR_ALL);
698698
PvAddPropPageLayoutItem(hwndDlg, context->ListViewHandle, dialogItem, PH_ANCHOR_ALL);
699-
PvAddPropPageLayoutItem(hwndDlg, GetDlgItem(hwndDlg, IDC_DESCRIPTION), dialogItem, PH_ANCHOR_LEFT | PH_ANCHOR_BOTTOM | PH_ANCHOR_RIGHT);
700-
PvAddPropPageLayoutItem(hwndDlg, GetDlgItem(hwndDlg, IDC_EDIT1), dialogItem, PH_ANCHOR_LEFT | PH_ANCHOR_BOTTOM | PH_ANCHOR_RIGHT);
701-
702699
PvDoPropPageLayout(hwndDlg);
703700

704701
propPageContext->LayoutInitialized = TRUE;
705702
}
706703
}
707704
break;
708-
case WM_NOTIFY:
709-
{
710-
LPNMHDR header = (LPNMHDR)lParam;
711-
712-
if (header->code == LVN_ITEMCHANGED)
713-
{
714-
PWSTR description;
715-
716-
if (ListView_GetSelectedCount(context->ListViewHandle) == 1)
717-
description = SmartAttributeGetDescription((SMART_ATTRIBUTE_ID)PhGetSelectedListViewItemParam(context->ListViewHandle));
718-
else
719-
description = L"";
720-
721-
SetDlgItemText(hwndDlg, IDC_EDIT1, description);
722-
}
723-
}
724-
break;
725705
}
726706

727707
return FALSE;
@@ -767,6 +747,7 @@ NTSTATUS ShowDiskDriveDetailsDialogThread(
767747
PhModalPropertySheet(&propContext->PropSheetHeader);
768748
PhDereferenceObject(propContext);
769749
}
750+
770751
return STATUS_SUCCESS;
771752
}
772753

plugins/HardwareDevices/resource.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121
#define IDC_SHOW_HIDDEN_ADAPTERS 1012
2222
#define IDD_DISKDRIVE_OPTIONS 1013
2323
#define IDD_DISKDRIVE_DIALOG 1014
24-
#define IDC_EDIT1 1015
2524
#define IDD_DISKDRIVE_PANEL 1016
2625
#define IDD_DISKDRIVE_DETAILS_SMART 1017
2726
#define IDC_DISKDRIVE_LISTVIEW 1017
28-
#define IDC_DESCRIPTION 1017
2927
#define IDC_DISKMOUNTPATH 1018
3028
#define IDC_STAT_BREAD 1020
3129
#define IDC_STAT_BWRITE 1021

plugins/HardwareDevices/storage.c

Lines changed: 0 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,134 +1501,5 @@ PWSTR SmartAttributeGetText(
15011501
return L"Free Fall Protection";
15021502
}
15031503

1504-
return L"Unknown";
1505-
}
1506-
1507-
PWSTR SmartAttributeGetDescription(
1508-
_In_ SMART_ATTRIBUTE_ID AttributeId
1509-
)
1510-
{
1511-
// https://en.wikipedia.org/wiki/S.M.A.R.T
1512-
1513-
switch (AttributeId)
1514-
{
1515-
case SMART_ATTRIBUTE_ID_READ_ERROR_RATE:
1516-
return L"Lower raw value is better.\r\nVendor specific raw value. Stores data related to the rate of hardware read errors that occurred when reading data from a disk surface. The raw value has different structure for different vendors and is often not meaningful as a decimal number.";
1517-
case SMART_ATTRIBUTE_ID_THROUGHPUT_PERFORMANCE:
1518-
return L"Higher raw value is better.\r\nOverall (general) throughput performance of a hard disk drive. If the value of this attribute is decreasing there is a high probability that there is a problem with the disk.";
1519-
case SMART_ATTRIBUTE_ID_SPIN_UP_TIME:
1520-
return L"Lower raw value is better.\r\nAverage time of spindle spin up (from zero RPM to fully operational [milliseconds]).";
1521-
case SMART_ATTRIBUTE_ID_START_STOP_COUNT:
1522-
return L"A tally of spindle start/stop cycles.\r\nThe spindle turns on, and hence the count is increased, both when the hard disk is turned on after having before been turned entirely off (disconnected from power source) and when the hard disk returns from having previously been put to sleep mode.";
1523-
case SMART_ATTRIBUTE_ID_REALLOCATED_SECTORS_COUNT:
1524-
return L"Lower raw value is better.\r\nCount of reallocated sectors. When the hard drive finds a read/write/verification error, it marks that sector as \"reallocated\" and transfers data to a special reserved area (spare area). This process is also known as remapping, and reallocated sectors are called \"remaps\". The raw value normally represents a count of the bad sectors that have been found and remapped. Thus, the higher the attribute value, the more sectors the drive has had to reallocate. This allows a drive with bad sectors to continue operation; however, a drive which has had any reallocations at all is significantly more likely to fail in the near future. While primarily used as a metric of the life expectancy of the drive, this number also affects performance. As the count of reallocated sectors increases, the read/write speed tends to become worse because the drive head is forced to seek to the reserved area whenever a remap is accessed. If sequential access speed is critical, the remapped sectors can be manually marked as bad blocks in the file system in order to prevent their use.";
1525-
case SMART_ATTRIBUTE_ID_READ_CHANNEL_MARGIN:
1526-
return L"Margin of a channel while reading data.\r\nThe function of this attribute is not specified.";
1527-
case SMART_ATTRIBUTE_ID_SEEK_ERROR_RATE:
1528-
return L"Vendor specific raw value.\r\nRate of seek errors of the magnetic heads. If there is a partial failure in the mechanical positioning system, then seek errors will arise. Such a failure may be due to numerous factors, such as damage to a servo, or thermal widening of the hard disk. The raw value has different structure for different vendors and is often not meaningful as a decimal number.";
1529-
case SMART_ATTRIBUTE_ID_SEEK_TIME_PERFORMANCE:
1530-
return L"Average performance of seek operations of the magnetic heads.\r\nIf this attribute is decreasing, it is a sign of problems in the mechanical subsystem.";
1531-
case SMART_ATTRIBUTE_ID_POWER_ON_HOURS:
1532-
return L"Count of hours in power-on state.\r\nThe raw value of this attribute shows total count of hours (or minutes, or seconds, depending on manufacturer) in power-on state.\r\nBy default, the total expected lifetime of a hard disk in perfect condition is defined as 5 years(running every day and night on all days).This is equal to 1825 days in 24 / 7 mode or 43800 hours.\r\nOn some pre-2005 drives, this raw value may advance erratically and/or \"wrap around\" (reset to zero periodically).";
1533-
case SMART_ATTRIBUTE_ID_SPIN_RETRY_COUNT:
1534-
return L"Count of retry of spin start attempts.\r\nThis attribute stores a total count of the spin start attempts to reach the fully operational speed (under the condition that the first attempt was unsuccessful). An increase of this attribute value is a sign of problems in the hard disk mechanical subsystem.";
1535-
case SMART_ATTRIBUTE_ID_CALIBRATION_RETRY_COUNT:
1536-
return L"This attribute indicates the count that recalibration was requested (under the condition that the first attempt was unsuccessful). An increase of this attribute value is a sign of problems in the hard disk mechanical subsystem.";
1537-
case SMART_ATTRIBUTE_ID_POWER_CYCLE_COUNT:
1538-
return L"This attribute indicates the count of full hard disk power on/off cycles.";
1539-
case SMART_ATTRIBUTE_ID_SOFT_READ_ERROR_RATE:
1540-
return L"Uncorrected read errors reported to the operating system.";
1541-
case SMART_ATTRIBUTE_ID_SATA_DOWNSHIFT_ERROR_COUNT:
1542-
return L"Western Digital, Samsung or Seagate attribute: Total number of data blocks with detected, uncorrectable errors encountered during normal operation.";
1543-
case SMART_ATTRIBUTE_ID_END_TO_END_ERROR:
1544-
return L"This attribute is a part of Hewlett-Packard's SMART IV technology, as well as part of other vendors' IO Error Detection and Correction schemas, and it contains a count of parity errors which occur in the data path to the media via the drive's cache RAM.";
1545-
case SMART_ATTRIBUTE_ID_HEAD_STABILITY:
1546-
return L"Western Digital attribute.";
1547-
case SMART_ATTRIBUTE_ID_INDUCED_OP_VIBRATION_DETECTION:
1548-
return L"Western Digital attribute.";
1549-
case SMART_ATTRIBUTE_ID_REPORTED_UNCORRECTABLE_ERRORS:
1550-
return L"The count of errors that could not be recovered using hardware ECC (see attribute 195).";
1551-
case SMART_ATTRIBUTE_ID_COMMAND_TIMEOUT:
1552-
return L"The count of aborted operations due to HDD timeout. Normally this attribute value should be equal to zero and if the value is far above zero, then most likely there will be some serious problems with power supply or an oxidized data cable.";
1553-
case SMART_ATTRIBUTE_ID_HIGH_FLY_WRITES:
1554-
return L"This attribute indicates the total count of the recording head flying outside its normal operating range. If an unsafe fly height condition is encountered, the write process is stopped, and the information is rewritten or reallocated to a safe region of the hard drive. This attribute indicates the count of these errors detected over the lifetime of the drive.";
1555-
case SMART_ATTRIBUTE_ID_TEMPERATURE_DIFFERENCE_FROM_100:
1556-
return L"Airflow temperature. Value is equal to (100?temp. °C), allowing manufacturer to set a minimum threshold which corresponds to a maximum temperature.";
1557-
case SMART_ATTRIBUTE_ID_GSENSE_ERROR_RATE:
1558-
return L"";
1559-
case SMART_ATTRIBUTE_ID_POWER_OFF_RETRACT_COUNT:
1560-
return L"";
1561-
case SMART_ATTRIBUTE_ID_LOAD_CYCLE_COUNT:
1562-
return L"";
1563-
case SMART_ATTRIBUTE_ID_TEMPERATURE:
1564-
return L"";
1565-
case SMART_ATTRIBUTE_ID_HARDWARE_ECC_RECOVERED:
1566-
return L"";
1567-
case SMART_ATTRIBUTE_ID_REALLOCATION_EVENT_COUNT:
1568-
return L"";
1569-
case SMART_ATTRIBUTE_ID_CURRENT_PENDING_SECTOR_COUNT:
1570-
return L"";
1571-
case SMART_ATTRIBUTE_ID_UNCORRECTABLE_SECTOR_COUNT:
1572-
return L"";
1573-
case SMART_ATTRIBUTE_ID_ULTRADMA_CRC_ERROR_COUNT:
1574-
return L"";
1575-
case SMART_ATTRIBUTE_ID_MULTI_ZONE_ERROR_RATE:
1576-
return L"";
1577-
case SMART_ATTRIBUTE_ID_OFFTRACK_SOFT_READ_ERROR_RATE:
1578-
return L"";
1579-
case SMART_ATTRIBUTE_ID_DATA_ADDRESS_MARK_ERRORS:
1580-
return L"";
1581-
case SMART_ATTRIBUTE_ID_RUN_OUT_CANCEL:
1582-
return L"";
1583-
case SMART_ATTRIBUTE_ID_SOFT_ECC_CORRECTION:
1584-
return L"";
1585-
case SMART_ATTRIBUTE_ID_THERMAL_ASPERITY_RATE_TAR:
1586-
return L"";
1587-
case SMART_ATTRIBUTE_ID_FLYING_HEIGHT:
1588-
return L"";
1589-
case SMART_ATTRIBUTE_ID_SPIN_HIGH_CURRENT:
1590-
return L"";
1591-
case SMART_ATTRIBUTE_ID_SPIN_BUZZ:
1592-
return L"";
1593-
case SMART_ATTRIBUTE_ID_OFFLINE_SEEK_PERFORMANCE:
1594-
return L"";
1595-
case SMART_ATTRIBUTE_ID_VIBRATION_DURING_WRITE:
1596-
return L"";
1597-
case SMART_ATTRIBUTE_ID_SHOCK_DURING_WRITE:
1598-
return L"";
1599-
case SMART_ATTRIBUTE_ID_DISK_SHIFT:
1600-
return L"";
1601-
case SMART_ATTRIBUTE_ID_GSENSE_ERROR_RATE_ALT:
1602-
return L"";
1603-
case SMART_ATTRIBUTE_ID_LOADED_HOURS:
1604-
return L"";
1605-
case SMART_ATTRIBUTE_ID_LOAD_UNLOAD_RETRY_COUNT:
1606-
return L"";
1607-
case SMART_ATTRIBUTE_ID_LOAD_FRICTION:
1608-
return L"";
1609-
case SMART_ATTRIBUTE_ID_LOAD_UNLOAD_CYCLE_COUNT:
1610-
return L"";
1611-
case SMART_ATTRIBUTE_ID_LOAD_IN_TIME:
1612-
return L"";
1613-
case SMART_ATTRIBUTE_ID_TORQUE_AMPLIFICATION_COUNT:
1614-
return L"";
1615-
case SMART_ATTRIBUTE_ID_POWER_OFF_RETTRACT_CYCLE:
1616-
return L"";
1617-
case SMART_ATTRIBUTE_ID_GMR_HEAD_AMPLITUDE:
1618-
return L"";
1619-
case SMART_ATTRIBUTE_ID_DRIVE_TEMPERATURE:
1620-
return L"";
1621-
case SMART_ATTRIBUTE_ID_HEAD_FLYING_HOURS:
1622-
return L"";
1623-
case SMART_ATTRIBUTE_ID_TOTAL_LBA_WRITTEN:
1624-
return L"";
1625-
case SMART_ATTRIBUTE_ID_TOTAL_LBA_READ:
1626-
return L"";
1627-
case SMART_ATTRIBUTE_ID_READ_ERROR_RETY_RATE:
1628-
return L"";
1629-
case SMART_ATTRIBUTE_ID_FREE_FALL_PROTECTION:
1630-
return L"";
1631-
}
1632-
16331504
return L"Unknown";
16341505
}

0 commit comments

Comments
 (0)