Lines Matching refs:ndx
167 * entry in the dbentry table for this ndx.
222 __log_do_open(lp, uid, name, ftype, ndx)
227 u_int32_t ndx;
246 (void)__log_add_logid(lp, dbp, name, ndx);
258 __log_add_logid(logp, dbp, name, ndx)
262 u_int32_t ndx;
272 * Check if we need to grow the table. Note, ndx is 0-based (the
276 if (logp->dbentry_cnt <= ndx) {
278 (ndx + DB_GROW_SIZE) * sizeof(DB_ENTRY))) != 0)
282 for (i = logp->dbentry_cnt; i < ndx + DB_GROW_SIZE; i++) {
294 NULL, &logp->dbentry[ndx].name)) != 0)
296 strcpy(logp->dbentry[ndx].name, name);
299 if (logp->dbentry[ndx].deleted == 0 && logp->dbentry[ndx].dbp == NULL) {
300 logp->dbentry[ndx].dbp = dbp;
301 logp->dbentry[ndx].refcount = 1;
302 logp->dbentry[ndx].deleted = dbp == NULL;
304 logp->dbentry[ndx].refcount++;
319 __db_fileid_to_db(logp, dbpp, ndx)
322 u_int32_t ndx;
338 if (ndx >= logp->dbentry_cnt ||
339 (!logp->dbentry[ndx].deleted && logp->dbentry[ndx].dbp == NULL)) {
340 if (__log_lid_to_fname(logp, ndx, &fname) != 0) {
359 fname->ufid, name, fname->s_type, ndx)) != 0)
361 *dbpp = logp->dbentry[ndx].dbp;
369 if (logp->dbentry[ndx].deleted) {
378 if ((*dbpp = logp->dbentry[ndx].dbp) == NULL)
411 __log_rem_logid(logp, ndx)
413 u_int32_t ndx;
416 if (--logp->dbentry[ndx].refcount == 0) {
417 logp->dbentry[ndx].dbp = NULL;
418 logp->dbentry[ndx].deleted = 0;