Lines Matching full:opt
57 } opt = { variable
69 #define OPT(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc } macro
70 OPT("ause", 'U', arg_none, opt, ause,
72 OPT("ndas", 'd', arg_none, opt, ndas,
74 OPT("oipbp", 'I', arg_none, opt, oipbp,
76 OPT("reportonly", 'r', arg_none, opt, reportonly,
78 OPT("owpass", 'c', arg_uint8, opt, owpass,
80 OPT("ovrpat", 'p', arg_uint32, opt, ovrpat,
82 OPT("sanact", 'a', arg_string, opt, sanact,
86 #undef OPT
89 { arg_string, &opt.dev, "controller-id" },
97 .ctx_size = sizeof(opt),
119 if (opt.sanact == NULL) { in sanitize()
120 if (!opt.reportonly) { in sanitize()
125 if (strcmp(opt.sanact, "exitfailure") == 0) in sanitize()
127 else if (strcmp(opt.sanact, "block") == 0) in sanitize()
129 else if (strcmp(opt.sanact, "overwrite") == 0) in sanitize()
131 else if (strcmp(opt.sanact, "crypto") == 0) in sanitize()
133 else if ((sanact = (int)strtol(opt.sanact, NULL, 10) != 0) in sanitize()
137 fprintf(stderr, "Incorrect Sanitize Action value: %s\n", opt.sanact); in sanitize()
141 if (opt.owpass == 0 || opt.owpass > 16) { in sanitize()
146 open_dev(opt.dev, &fd, 1, 1); in sanitize()
154 if (opt.reportonly) in sanitize()
176 pt.cmd.cdw10 = htole32((opt.ndas << 9) | (opt.oipbp << 8) | in sanitize()
177 ((opt.owpass & 0xf) << 4) | (opt.ause << 3) | sanact); in sanitize()
178 pt.cmd.cdw11 = htole32(opt.ovrpat); in sanitize()