Lines Matching full:nv

48 #include <sys/nv.h>
263 struct cctl_lun_nv *nv; in cctl_end_element() local
265 nv = calloc(1, sizeof(*nv)); in cctl_end_element()
266 if (nv == NULL) in cctl_end_element()
267 log_err(1, "%s: can't allocate %zd bytes for nv pair", in cctl_end_element()
268 __func__, sizeof(*nv)); in cctl_end_element()
270 nv->name = checked_strdup(name); in cctl_end_element()
272 nv->value = str; in cctl_end_element()
274 STAILQ_INSERT_TAIL(&cur_lun->attr_list, nv, links); in cctl_end_element()
389 struct cctl_lun_nv *nv; in cctl_end_pelement() local
391 nv = calloc(1, sizeof(*nv)); in cctl_end_pelement()
392 if (nv == NULL) in cctl_end_pelement()
393 log_err(1, "%s: can't allocate %zd bytes for nv pair", in cctl_end_pelement()
394 __func__, sizeof(*nv)); in cctl_end_pelement()
396 nv->name = checked_strdup(name); in cctl_end_pelement()
398 nv->value = str; in cctl_end_pelement()
400 STAILQ_INSERT_TAIL(&cur_port->attr_list, nv, links); in cctl_end_pelement()
618 struct cctl_lun_nv *nv; in conf_new_from_kernel() local
625 while ((nv = STAILQ_FIRST(&port->attr_list))) { in conf_new_from_kernel()
627 free(nv->value); in conf_new_from_kernel()
628 free(nv->name); in conf_new_from_kernel()
629 free(nv); in conf_new_from_kernel()
636 struct cctl_lun_nv *nv; in conf_new_from_kernel() local
669 STAILQ_FOREACH(nv, &lun->attr_list, links) { in conf_new_from_kernel()
670 if (strcmp(nv->name, "file") == 0 || in conf_new_from_kernel()
671 strcmp(nv->name, "dev") == 0) { in conf_new_from_kernel()
672 lun_set_path(cl, nv->value); in conf_new_from_kernel()
675 o = option_new(&cl->l_options, nv->name, nv->value); in conf_new_from_kernel()
679 nv->name, (uintmax_t) lun->lun_id, in conf_new_from_kernel()
684 struct cctl_lun_nv *nv; in conf_new_from_kernel() local
687 while ((nv = STAILQ_FIRST(&lun->attr_list))) { in conf_new_from_kernel()
689 free(nv->value); in conf_new_from_kernel()
690 free(nv->name); in conf_new_from_kernel()
691 free(nv); in conf_new_from_kernel()