Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144895711
D44652.id136615.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D44652.id136615.diff
View Options
diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c
--- a/sbin/nvmecontrol/logpage.c
+++ b/sbin/nvmecontrol/logpage.c
@@ -219,10 +219,6 @@
/* Convert data to host endian */
switch (log_page) {
- case NVME_LOG_HEALTH_INFORMATION:
- nvme_health_information_page_swapbytes(
- (struct nvme_health_information_page *)payload);
- break;
case NVME_LOG_CHANGED_NAMESPACE:
nvme_ns_list_swapbytes((struct nvme_ns_list *)payload);
break;
@@ -325,7 +321,7 @@
uint8_t warning;
int i;
- warning = health->critical_warning;
+ warning = LE2H(health->critical_warning);
printf("SMART/Health Information Log\n");
printf("============================\n");
@@ -342,13 +338,13 @@
printf(" Volatile memory backup: %d\n",
!!(warning & NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP));
printf("Temperature: ");
- print_temp_K(health->temperature);
+ print_temp_K(LE2H(health->temperature));
printf("Available spare: %u\n",
- health->available_spare);
+ LE2H(health->available_spare));
printf("Available spare threshold: %u\n",
- health->available_spare_threshold);
+ LE2H(health->available_spare_threshold));
printf("Percentage used: %u\n",
- health->percentage_used);
+ LE2H(health->percentage_used));
printf("Data units (512,000 byte) read: %s\n",
uint128_to_str(to128(health->data_units_read), cbuf, sizeof(cbuf)));
@@ -371,18 +367,18 @@
printf("No. error info log entries: %s\n",
uint128_to_str(to128(health->num_error_info_log_entries), cbuf, sizeof(cbuf)));
- printf("Warning Temp Composite Time: %d\n", health->warning_temp_time);
- printf("Error Temp Composite Time: %d\n", health->error_temp_time);
+ printf("Warning Temp Composite Time: %d\n", LE2H(health->warning_temp_time));
+ printf("Error Temp Composite Time: %d\n", LE2H(health->error_temp_time));
for (i = 0; i < 8; i++) {
- if (health->temp_sensor[i] == 0)
+ if (LE2H(health->temp_sensor[i]) == 0)
continue;
printf("Temperature Sensor %d: ", i + 1);
- print_temp_K(health->temp_sensor[i]);
+ print_temp_K(LE2H(health->temp_sensor[i]));
}
- printf("Temperature 1 Transition Count: %d\n", health->tmt1tc);
- printf("Temperature 2 Transition Count: %d\n", health->tmt2tc);
- printf("Total Time For Temperature 1: %d\n", health->ttftmt1);
- printf("Total Time For Temperature 2: %d\n", health->ttftmt2);
+ printf("Temperature 1 Transition Count: %d\n", LE2H(health->tmt1tc));
+ printf("Temperature 2 Transition Count: %d\n", LE2H(health->tmt2tc));
+ printf("Total Time For Temperature 1: %d\n", LE2H(health->ttftmt1));
+ printf("Total Time For Temperature 2: %d\n", LE2H(health->ttftmt2));
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 14, 8:58 PM (3 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28715115
Default Alt Text
D44652.id136615.diff (2 KB)
Attached To
Mode
D44652: nvmecontrol: Move smart/health printing to little endian orderinng
Attached
Detach File
Event Timeline
Log In to Comment