Lines Matching defs:opt
60 } opt = {
72 #define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc }
73 OPT("ause", 'U', arg_none, opt, ause,
75 OPT("ndas", 'd', arg_none, opt, ndas,
77 OPT("oipbp", 'I', arg_none, opt, oipbp,
79 OPT("reportonly", 'r', arg_none, opt, reportonly,
81 OPT("owpass", 'c', arg_uint8, opt, owpass,
83 OPT("ovrpat", 'p', arg_uint32, opt, ovrpat,
85 OPT("sanact", 'a', arg_string, opt, sanact,
92 { arg_string, &opt.dev, "controller-id" },
100 .ctx_size = sizeof(opt),
122 if (opt.sanact == NULL) {
123 if (!opt.reportonly) {
128 if (strcmp(opt.sanact, "exitfailure") == 0)
130 else if (strcmp(opt.sanact, "block") == 0)
132 else if (strcmp(opt.sanact, "overwrite") == 0)
134 else if (strcmp(opt.sanact, "crypto") == 0)
141 if (opt.owpass == 0 || opt.owpass > 16) {
146 open_dev(opt.dev, &fd, 1, 1);
154 if (opt.reportonly)
179 pt.cmd.cdw10 = htole32((opt.ndas << 9) | (opt.oipbp << 8) |
180 ((opt.owpass & 0xf) << 4) | (opt.ause << 3) | sanact);
181 pt.cmd.cdw11 = htole32(opt.ovrpat);