git: 0c66083c035c - stable/14 - nvmecontrol: Move namespace change page printing to little endian orderinng
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Aug 2024 01:06:41 UTC
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0c66083c035c90e6991e18914b1fcdbdc70d8e7d commit 0c66083c035c90e6991e18914b1fcdbdc70d8e7d Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-04-16 22:36:13 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-08-26 18:31:02 +0000 nvmecontrol: Move namespace change page printing to little endian orderinng Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44653 (cherry picked from commit acdf72f7bbe582b8eabf09576dc93eb4fcfbd19b) --- sbin/nvmecontrol/logpage.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sbin/nvmecontrol/logpage.c b/sbin/nvmecontrol/logpage.c index 0ed19222ba1a..845dad0cd539 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -220,9 +220,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_CHANGED_NAMESPACE: - nvme_ns_list_swapbytes((struct nvme_ns_list *)payload); - break; case NVME_LOG_DEVICE_SELF_TEST: nvme_device_self_test_swapbytes( (struct nvme_device_self_test_page *)payload); @@ -430,8 +427,8 @@ print_log_ns(const struct nvme_controller_data *cdata __unused, void *buf, printf("Changed Namespace List\n"); printf("======================\n"); - for (i = 0; i < nitems(nsl->ns) && nsl->ns[i] != 0; i++) { - printf("%08x\n", nsl->ns[i]); + for (i = 0; i < nitems(nsl->ns) && letoh(nsl->ns[i]) != 0; i++) { + printf("%08x\n", letoh(nsl->ns[i])); } }