Lines Matching defs:dir

122 	sbp2_cfgrom_ent_t	*dir = pa->pa_dir; /* directory being parsed */
133 this_pa.pa_pdir = dir;
138 SBP2_CFGROM_RQ(tp, cmd, dir->ce_offset, &entry);
139 dir->ce_len = IEEE1212_DIR_LEN(entry);
140 sbp2_cfgrom_dir_grow(&dir->ce_data.dir, dir->ce_len);
143 addr = dir->ce_offset + 4;
144 for (i = 0; i < dir->ce_len; i++, addr += 4) {
148 cep = sbp2_cfgrom_dir_new_ent(&dir->ce_data.dir);
164 if (dir->ce_kv != IEEE1212_TEXTUAL_DESCRIPTOR) {
267 sbp2_cfgrom_dir_grow(sbp2_cfgrom_dir_t *dir, int incr)
274 new_size = (dir->cd_size + incr) * sizeof (sbp2_cfgrom_ent_t);
276 if (dir->cd_size > 0) {
277 old_size = dir->cd_size * sizeof (sbp2_cfgrom_ent_t);
278 bcopy(dir->cd_ent, new_ent, old_size);
279 kmem_free(dir->cd_ent, old_size);
281 dir->cd_ent = new_ent;
282 dir->cd_size += incr;
286 sbp2_cfgrom_dir_new_ent(sbp2_cfgrom_dir_t *dir)
289 if (dir->cd_cnt >= dir->cd_size) {
290 ASSERT(dir->cd_cnt == dir->cd_size);
291 sbp2_cfgrom_dir_grow(dir, SBP2_CFGROM_GROW_INCR);
294 return (&dir->cd_ent[dir->cd_cnt++]);
301 sbp2_cfgrom_walk(sbp2_cfgrom_ent_t *dir,
304 ASSERT(dir->ce_kt == IEEE1212_DIRECTORY_TYPE);
305 (void) sbp2_cfgrom_walk_impl(dir, func, arg, 0);
309 sbp2_cfgrom_walk_impl(sbp2_cfgrom_ent_t *dir,
315 for (i = 0; i < dir->ce_data.dir.cd_cnt; i++) {
316 ent = &dir->ce_data.dir.cd_ent[i];
332 sbp2_cfgrom_ent_by_key(sbp2_cfgrom_ent_t *dir, int8_t kt, int8_t kv, int num)
341 sbp2_cfgrom_walk(dir, sbp2_cfgrom_ent_by_key_walker, &ebk);
371 sbp2_cfgrom_walk_free(sbp2_cfgrom_ent_t *dir)
374 sbp2_cfgrom_dir_t *cdp = &dir->ce_data.dir;