nvme/identify: print namespace UUID if present
Change-Id: I8c455ad6bb71fb2519ac741c78aa0ed5de643729 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/405807 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
39c9463a08
commit
1e3c4c8b37
@ -42,6 +42,7 @@
|
||||
#include "spdk/pci_ids.h"
|
||||
#include "spdk/string.h"
|
||||
#include "spdk/util.h"
|
||||
#include "spdk/uuid.h"
|
||||
|
||||
#define MAX_DISCOVERY_LOG_ENTRIES ((uint64_t)1000)
|
||||
|
||||
@ -455,8 +456,10 @@ static void
|
||||
print_namespace(struct spdk_nvme_ns *ns)
|
||||
{
|
||||
const struct spdk_nvme_ns_data *nsdata;
|
||||
const struct spdk_uuid *uuid;
|
||||
uint32_t i;
|
||||
uint32_t flags;
|
||||
char uuid_str[SPDK_UUID_STRING_LEN];
|
||||
|
||||
nsdata = spdk_nvme_ns_get_data(ns);
|
||||
flags = spdk_nvme_ns_get_flags(ns);
|
||||
@ -519,6 +522,11 @@ print_namespace(struct spdk_nvme_ns *ns)
|
||||
print_hex_be(&nsdata->eui64, sizeof(nsdata->eui64));
|
||||
printf("\n");
|
||||
}
|
||||
uuid = spdk_nvme_ns_get_uuid(ns);
|
||||
if (uuid) {
|
||||
spdk_uuid_fmt_lower(uuid_str, sizeof(uuid_str), uuid);
|
||||
printf("UUID: %s\n", uuid_str);
|
||||
}
|
||||
printf("Thin Provisioning: %s\n",
|
||||
nsdata->nsfeat.thin_prov ? "Supported" : "Not Supported");
|
||||
printf("Per-NS Atomic Units: %s\n",
|
||||
|
Loading…
Reference in New Issue
Block a user