Lines Matching refs:cnt
179 int cnt; in chk_badsec() local
182 for (cnt = 0; cnt < ap->ap_gbadcnt; cnt++) { in chk_badsec()
183 badsec = (ap->ap_gbadp)[cnt].bad_start; in chk_badsec()
217 (ap->ap_gbadp)[cnt].bad_start = in chk_badsec()
221 (ap->ap_gbadp)[cnt].bad_start = in chk_badsec()
230 &((ap->ap_gbadp)[cnt])); in chk_badsec()
236 (ap->ap_gbadp)[cnt].bad_start = in chk_badsec()
253 int cnt; in init_altsctr() local
264 for (cnt = 0; cnt < 5; cnt++) in init_altsctr()
265 ap->ap_tblp->alts_pad[cnt] = 0; in init_altsctr()
267 for (cnt = 0; cnt < ap->ap_gbadcnt; cnt++) { in init_altsctr()
268 badsec = (ap->ap_gbadp)[cnt].bad_start; in init_altsctr()
276 (ap->ap_gbadp)[cnt].bad_start = in init_altsctr()
400 int cnt; in get_badsec() local
408 cnt = count_badsec(); in get_badsec()
409 if (cnt == 0) { in get_badsec()
413 ap->ap_gbadp = malloc(cnt * ALTS_ENT_SIZE); in get_badsec()
416 cnt * ALTS_ENT_SIZE); in get_badsec()
419 (void) memset(ap->ap_gbadp, 0, cnt * ALTS_ENT_SIZE); in get_badsec()
421 for (growbadp = ap->ap_gbadp, cnt = 0, blc_p = badsl_chain; in get_badsec()
438 growbadp[cnt].bad_start = curbad; in get_badsec()
439 growbadp[cnt].bad_end = curbad; in get_badsec()
440 cnt++; in get_badsec()
444 ap->ap_gbadcnt = cnt; in get_badsec()
620 altsmap_alloc(blkaddr_t srt_ind, blkaddr_t end_ind, int cnt, int dir) in altsmap_alloc() argument
634 if (total == cnt) in altsmap_alloc()
646 ent_sort(struct alts_ent buf[], int cnt) in ent_sort() argument
652 for (i = 0; i < cnt-1; i++) { in ent_sort()
653 temp = buf[cnt-1]; in ent_sort()
656 for (j = cnt-1; j > i; j--) { in ent_sort()
678 ent_compress(struct alts_ent buf[], int cnt) in ent_compress() argument
684 for (i = 0; i < cnt; i++) { in ent_compress()
687 for (keyp = i, movp = i+1; movp < cnt; movp++) { in ent_compress()
695 if (movp == cnt) in ent_compress()
744 ent_bsearch(struct alts_ent buf[], int cnt, struct alts_ent *key) in ent_bsearch() argument
751 if (!cnt) in ent_bsearch()
754 for (i = 1; i <= cnt; i <<= 1) in ent_bsearch()
771 if (ind == cnt) in ent_bsearch()
773 if ((ind + interval) <= cnt) in ent_bsearch()
789 int cnt = ap->ap_tblp->alts_ent_used; in chk_bad_altsctr() local
794 for (i = 0; i < cnt; i++) { in chk_bad_altsctr()