Lines Matching refs:iter
106 nvme_vuc_discover_fini(nvme_vuc_iter_t *iter) in nvme_vuc_discover_fini() argument
108 free(iter); in nvme_vuc_discover_fini()
112 nvme_vuc_discover_step(nvme_vuc_iter_t *iter, const nvme_vuc_disc_t **outp) in nvme_vuc_discover_step() argument
114 nvme_ctrl_t *ctrl = iter->nvi_ctrl; in nvme_vuc_discover_step()
120 if (iter->nvi_cur_idx >= ctrl->nc_vsd->nvd_nvuc) { in nvme_vuc_discover_step()
124 *outp = &ctrl->nc_vsd->nvd_vuc[iter->nvi_cur_idx]; in nvme_vuc_discover_step()
125 iter->nvi_cur_idx++; in nvme_vuc_discover_step()
133 nvme_vuc_iter_t *iter; in nvme_vuc_discover_init() local
146 iter = calloc(1, sizeof (nvme_vuc_iter_t)); in nvme_vuc_discover_init()
147 if (iter == NULL) { in nvme_vuc_discover_init()
154 iter->nvi_ctrl = ctrl; in nvme_vuc_discover_init()
156 *iterp = iter; in nvme_vuc_discover_init()
164 nvme_vuc_iter_t *iter; in nvme_vuc_discover() local
174 if (!nvme_vuc_discover_init(ctrl, flags, &iter)) { in nvme_vuc_discover()
178 while ((ret = nvme_vuc_discover_step(iter, &disc)) == NVME_ITER_VALID) { in nvme_vuc_discover()
183 nvme_vuc_discover_fini(iter); in nvme_vuc_discover()
195 nvme_vuc_iter_t *iter; in nvme_vuc_discover_by_name() local
210 if (!nvme_vuc_discover_init(ctrl, flags, &iter)) { in nvme_vuc_discover_by_name()
215 while ((ret = nvme_vuc_discover_step(iter, &disc)) == NVME_ITER_VALID) { in nvme_vuc_discover_by_name()
225 nvme_vuc_discover_fini(iter); in nvme_vuc_discover_by_name()
230 nvme_vuc_discover_fini(iter); in nvme_vuc_discover_by_name()