Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145048887
D44658.1777276946.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44658.1777276946.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
@@ -217,16 +217,6 @@
if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
err(EX_IOERR, "get log page request failed");
- /* Convert data to host endian */
- switch (log_page) {
- case INTEL_LOG_TEMP_STATS:
- intel_log_temp_stats_swapbytes(
- (struct intel_log_temp_stats *)payload);
- break;
- default:
- break;
- }
-
if (nvme_completion_is_error(&pt.cpl))
errx(EX_IOERR, "get log page request returned error");
}
diff --git a/sbin/nvmecontrol/modules/intel/intel.c b/sbin/nvmecontrol/modules/intel/intel.c
--- a/sbin/nvmecontrol/modules/intel/intel.c
+++ b/sbin/nvmecontrol/modules/intel/intel.c
@@ -61,18 +61,21 @@
printf("=====================\n");
printf("Current: ");
- print_temp_C(temp->current);
- printf("Overtemp Last Flags %#jx\n", (uintmax_t)temp->overtemp_flag_last);
- printf("Overtemp Lifetime Flags %#jx\n", (uintmax_t)temp->overtemp_flag_life);
+ print_temp_C(letoh(temp->current));
+ printf("Overtemp Last Flags %#jx\n",
+ (uintmax_t)letoh(temp->overtemp_flag_last));
+ printf("Overtemp Lifetime Flags %#jx\n",
+ (uintmax_t)letoh(temp->overtemp_flag_life));
printf("Max Temperature ");
- print_temp_C(temp->max_temp);
+ print_temp_C(letoh(temp->max_temp));
printf("Min Temperature ");
- print_temp_C(temp->min_temp);
+ print_temp_C(letoh(temp->min_temp));
printf("Max Operating Temperature ");
- print_temp_C(temp->max_oper_temp);
+ print_temp_C(letoh(temp->max_oper_temp));
printf("Min Operating Temperature ");
- print_temp_C(temp->min_oper_temp);
- printf("Estimated Temperature Offset: %ju C/K\n", (uintmax_t)temp->est_offset);
+ print_temp_C(letoh(temp->min_oper_temp));
+ printf("Estimated Temperature Offset: %ju C/K\n",
+ (uintmax_t)letoh(temp->est_offset));
}
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 27, 8:02 AM (9 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28437520
Default Alt Text
D44658.1777276946.diff (1 KB)
Attached To
Mode
D44658: nvmecontrol: Move intel temperature page printing to little endian orderinng
Attached
Detach File
Event Timeline
Log In to Comment