mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
nvmecontrol: Move reservation notifcation page printing to little endian orderinng
Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44656
This commit is contained in:
parent
b850caf7b7
commit
3d28a9c608
|
@ -219,10 +219,6 @@ read_logpage(int fd, uint8_t log_page, uint32_t nsid, uint8_t lsp,
|
|||
|
||||
/* Convert data to host endian */
|
||||
switch (log_page) {
|
||||
case NVME_LOG_RES_NOTIFICATION:
|
||||
nvme_res_notification_page_swapbytes(
|
||||
(struct nvme_res_notification_page *)payload);
|
||||
break;
|
||||
case NVME_LOG_SANITIZE_STATUS:
|
||||
nvme_sanitize_status_page_swapbytes(
|
||||
(struct nvme_sanitize_status_page *)payload);
|
||||
|
@ -472,9 +468,10 @@ print_log_res_notification(const struct nvme_controller_data *cdata __unused,
|
|||
printf("Reservation Notification\n");
|
||||
printf("========================\n");
|
||||
|
||||
printf("Log Page Count: %ju\n", rn->log_page_count);
|
||||
printf("Log Page Count: %ju\n",
|
||||
(uintmax_t)letoh(rn->log_page_count));
|
||||
printf("Log Page Type: ");
|
||||
switch (rn->log_page_type) {
|
||||
switch (letoh(rn->log_page_type)) {
|
||||
case 0:
|
||||
printf("Empty Log Page\n");
|
||||
break;
|
||||
|
@ -488,11 +485,11 @@ print_log_res_notification(const struct nvme_controller_data *cdata __unused,
|
|||
printf("Reservation Preempted\n");
|
||||
break;
|
||||
default:
|
||||
printf("Unknown %x\n", rn->log_page_type);
|
||||
printf("Unknown %x\n", letoh(rn->log_page_type));
|
||||
break;
|
||||
};
|
||||
printf("Number of Available Log Pages: %d\n", rn->available_log_pages);
|
||||
printf("Namespace ID: 0x%x\n", rn->nsid);
|
||||
printf("Number of Available Log Pages: %d\n", letoh(rn->available_log_pages));
|
||||
printf("Namespace ID: 0x%x\n", letoh(rn->nsid));
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue