Lines Matching refs:iter
178 nvme_feat_discover_fini(nvme_feat_iter_t *iter) in nvme_feat_discover_fini() argument
180 free(iter); in nvme_feat_discover_fini()
184 nvme_feat_discover_one(nvme_feat_iter_t *iter, const nvme_feat_info_t *info) in nvme_feat_discover_one() argument
186 nvme_feat_disc_t *disc = &iter->nfi_disc; in nvme_feat_discover_one()
189 data.vcd_vers = &iter->nfi_ctrl->nc_vers; in nvme_feat_discover_one()
190 data.vcd_id = &iter->nfi_ctrl->nc_info; in nvme_feat_discover_one()
195 if ((iter->nfi_scope & info->nfeat_scope) == 0) { in nvme_feat_discover_one()
219 nvme_feat_discover_step(nvme_feat_iter_t *iter, const nvme_feat_disc_t **outp) in nvme_feat_discover_step() argument
223 if (iter->nfi_cur_idx == nvme_std_nfeats) { in nvme_feat_discover_step()
227 while (iter->nfi_cur_idx < nvme_std_nfeats) { in nvme_feat_discover_step()
229 &nvme_std_feats[iter->nfi_cur_idx]; in nvme_feat_discover_step()
230 iter->nfi_cur_idx++; in nvme_feat_discover_step()
232 if (nvme_feat_discover_one(iter, feat)) { in nvme_feat_discover_step()
233 *outp = &iter->nfi_disc; in nvme_feat_discover_step()
244 ASSERT3U(iter->nfi_cur_idx, ==, nvme_std_nfeats); in nvme_feat_discover_step()
252 nvme_feat_iter_t *iter; in nvme_feat_discover_init() local
264 iter = calloc(1, sizeof (nvme_feat_iter_t)); in nvme_feat_discover_init()
265 if (iter == NULL) { in nvme_feat_discover_init()
272 iter->nfi_ctrl = ctrl; in nvme_feat_discover_init()
273 iter->nfi_scope = scope; in nvme_feat_discover_init()
275 *iterp = iter; in nvme_feat_discover_init()
283 nvme_feat_iter_t *iter; in nvme_feat_discover() local
294 if (!nvme_feat_discover_init(ctrl, scope, flags, &iter)) { in nvme_feat_discover()
298 while ((ret = nvme_feat_discover_step(iter, &disc)) == in nvme_feat_discover()
304 nvme_feat_discover_fini(iter); in nvme_feat_discover()