Lines Matching refs:info

30 ns_info_test_inactive(nvme_ns_info_t *info, uint32_t nsid)  in ns_info_test_inactive()  argument
38 if (nvme_ns_info_nguid(info, guid)) { in ns_info_test_inactive()
42 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
45 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
46 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
54 if (nvme_ns_info_eui64(info, guid)) { in ns_info_test_inactive()
58 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
61 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
62 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
70 if (nvme_ns_info_size(info, &val)) { in ns_info_test_inactive()
74 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
77 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
78 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
86 if (nvme_ns_info_cap(info, &val)) { in ns_info_test_inactive()
90 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
93 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
94 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
102 if (nvme_ns_info_use(info, &val)) { in ns_info_test_inactive()
106 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
109 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
110 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
118 if (nvme_ns_info_curformat(info, &fmt)) { in ns_info_test_inactive()
122 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
125 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
126 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
134 if (nvme_ns_info_format(info, 0, &fmt)) { in ns_info_test_inactive()
138 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_INACTIVE) { in ns_info_test_inactive()
141 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
142 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
150 if (nvme_ns_info_bd_addr(info, &bd)) { in ns_info_test_inactive()
154 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_NS_NO_BLKDEV) { in ns_info_test_inactive()
157 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test_inactive()
158 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test_inactive()
170 ns_info_test_size(nvme_ns_info_t *info, in ns_info_test_size() argument
176 if (!func(info, &val)) { in ns_info_test_size()
177 libnvme_test_ns_info_warn(info, "ns %u nvme_ns_info_%s() " in ns_info_test_size()
197 nvme_ns_info_t *info = NULL; in ns_info_test() local
214 if (!nvme_ns_info_snap(ns, &info)) { in ns_info_test()
221 if (!nvme_ctrl_ns_info_snap(ctrl, nsid, &info)) { in ns_info_test()
231 if (nvme_ns_info_nsid(info) != nsid) { in ns_info_test()
233 "nsid: %u", nsid, nvme_ns_info_nsid(info)); in ns_info_test()
246 level = nvme_ns_info_level(info); in ns_info_test()
248 if (!ns_info_test_inactive(info, nsid)) { in ns_info_test()
254 idns = nvme_ns_info_identify(info); in ns_info_test()
261 if (!ns_info_test_size(info, nvme_ns_info_size, idns->id_nsize, "size", in ns_info_test()
266 if (!ns_info_test_size(info, nvme_ns_info_cap, idns->id_ncap, "cap", in ns_info_test()
271 if (!ns_info_test_size(info, nvme_ns_info_use, idns->id_nuse, "use", in ns_info_test()
276 if (!nvme_ns_info_curformat(info, &fmt)) { in ns_info_test()
277 libnvme_test_ns_info_warn(info, "ns %u failed to get current " in ns_info_test()
290 if (!nvme_ns_info_nformats(info, &nfmt)) { in ns_info_test()
291 libnvme_test_ns_info_warn(info, "ns %u failed to get number " in ns_info_test()
304 if (nvme_ns_info_format(info, 0x7777, &fmt)) { in ns_info_test()
308 } else if (nvme_ns_info_err(info) != NVME_INFO_ERR_BAD_FMT) { in ns_info_test()
311 "(0x%x)", nsid, nvme_ns_info_errtostr(info, in ns_info_test()
312 nvme_ns_info_err(info)), nvme_ns_info_err(info), in ns_info_test()
321 nvme_ns_info_free(info); in ns_info_test()
355 nvme_ctrl_info_t *info; in main() local
362 if (!nvme_ctrl_info_snap(ctrl, &info)) { in main()
367 nns = nvme_ctrl_info_nns(info); in main()
373 vers = nvme_ctrl_info_version(info); in main()
404 nvme_ctrl_info_free(info); in main()