Lines Matching defs:opt
67 } opt = {
79 #define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
80 OPT("binary", 'b', arg_none, opt, binary,
82 OPT("hex", 'x', arg_none, opt, hex,
84 OPT("page", 'p', arg_uint32, opt, page,
86 OPT("lsp", 'f', arg_uint8, opt, lsp,
88 OPT("lsi", 'i', arg_uint16, opt, lsi,
90 OPT("rae", 'r', arg_none, opt, rae,
92 OPT("vendor", 'v', arg_string, opt, vendor,
99 { arg_string, &opt.dev, "<controller id|namespace id>" },
107 .ctx_size = sizeof(opt),
781 if (opt.hex && opt.binary) {
786 if (opt.vendor != NULL && strcmp(opt.vendor, "help") == 0)
788 if (opt.page == NONE) {
792 open_dev(opt.dev, &fd, 0, 1);
814 if (opt.page != NVME_LOG_HEALTH_INFORMATION)
816 opt.page);
825 if (opt.binary)
827 if (!opt.binary && !opt.hex) {
836 if (lpf->vendor != NULL && opt.vendor != NULL &&
837 strcmp(lpf->vendor, opt.vendor) != 0)
839 if (opt.page != lpf->log_page)
848 if (opt.page == NVME_LOG_ERROR) {
855 read_logpage(fd, opt.page, nsid, opt.lsp, opt.lsi, opt.rae, buf, size);