git: acdf72f7bbe5 - main - nvmecontrol: Move namespace change page printing to little endian orderinng
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Apr 2024 03:33:46 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=acdf72f7bbe582b8eabf09576dc93eb4fcfbd19b commit acdf72f7bbe582b8eabf09576dc93eb4fcfbd19b Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2024-04-16 22:36:13 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2024-04-17 03:30:18 +0000 nvmecontrol: Move namespace change page printing to little endian orderinng Sponsored by: Netflix Reviewed by: chuck Differential Revision: https://reviews.freebsd.org/D44653 --- 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 0ae2c52155b4..0cf6e5f9fa94 100644 --- a/sbin/nvmecontrol/logpage.c +++ b/sbin/nvmecontrol/logpage.c @@ -219,9 +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_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); @@ -429,8 +426,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])); } }