From efa2980530d54b1336ddefc5fba963ef1bd9e020 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Mon, 6 Jan 2014 23:48:47 +0000 Subject: [PATCH] For "nvmecontrol devlist", show namespace sizes in terms of MB instead of GB to improve granularity of the reporting - especially for namespaces that are on the order of 1 or 2 GB. Submitted by: Tony Beltran MFC after: 3 days --- sbin/nvmecontrol/devlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/nvmecontrol/devlist.c b/sbin/nvmecontrol/devlist.c index f73d643e93d..35a46c187a7 100644 --- a/sbin/nvmecontrol/devlist.c +++ b/sbin/nvmecontrol/devlist.c @@ -99,11 +99,11 @@ devlist(int argc, char *argv[]) sprintf(name, "%s%d%s%d", NVME_CTRLR_PREFIX, ctrlr, NVME_NS_PREFIX, i+1); read_namespace_data(fd, i+1, &nsdata); - printf(" %10s (%lldGB)\n", + printf(" %10s (%lldMB)\n", name, nsdata.nsze * (long long)ns_get_sector_size(&nsdata) / - 1024 / 1024 / 1024); + 1024 / 1024); } close(fd);