Lines Matching defs:opt
145 struct ctl_option *opt;
154 opt = malloc(sizeof(*opt), M_CTL, M_WAITOK);
155 opt->name = strdup(args[i].kname, M_CTL);
156 opt->value = strdup(args[i].kvalue, M_CTL);
157 STAILQ_INSERT_TAIL(opts, opt, links);
164 struct ctl_option *opt;
172 STAILQ_FOREACH(opt, opts, links) {
173 if (strcmp(opt->name, args[i].kname) == 0)
178 if (opt) {
179 free(opt->value, M_CTL);
180 opt->value = strdup(args[i].kvalue, M_CTL);
182 opt = malloc(sizeof(*opt), M_CTL, M_WAITOK);
183 opt->name = strdup(args[i].kname, M_CTL);
184 opt->value = strdup(args[i].kvalue, M_CTL);
185 STAILQ_INSERT_TAIL(opts, opt, links);
187 } else if (opt) {
188 STAILQ_REMOVE(opts, opt, ctl_option, links);
189 free(opt->name, M_CTL);
190 free(opt->value, M_CTL);
191 free(opt, M_CTL);
199 struct ctl_option *opt;
201 while ((opt = STAILQ_FIRST(opts)) != NULL) {
203 free(opt->name, M_CTL);
204 free(opt->value, M_CTL);
205 free(opt, M_CTL);
212 struct ctl_option *opt;
214 STAILQ_FOREACH(opt, opts, links) {
215 if (strcmp(opt->name, name) == 0) {
216 return (opt->value);