Home | History | Annotate | Download | only in fsck_msdos

Lines Matching refs:cl

138 checkclnum(struct bootblock *boot, int fat, cl_t cl, cl_t *next)
153 cl, fat,
211 cl_t cl;
286 for (cl = CLUST_FIRST; cl < boot->NumClusters;) {
289 fat[cl].next = p[0] + (p[1] << 8)
291 fat[cl].next &= boot->ClustMask;
292 ret |= checkclnum(boot, no, cl, &fat[cl].next);
293 cl++;
297 fat[cl].next = p[0] + (p[1] << 8);
298 ret |= checkclnum(boot, no, cl, &fat[cl].next);
299 cl++;
303 fat[cl].next = (p[0] + (p[1] << 8)) & 0x0fff;
304 ret |= checkclnum(boot, no, cl, &fat[cl].next);
305 cl++;
306 if (cl >= boot->NumClusters)
308 fat[cl].next = ((p[1] >> 4) + (p[2] << 4)) & 0x0fff;
309 ret |= checkclnum(boot, no, cl, &fat[cl].next);
310 cl++;
325 rsrvdcltype(cl_t cl)
327 if (cl == CLUST_FREE)
329 if (cl < CLUST_BAD)
331 if (cl > CLUST_BAD)
337 clustdiffer(cl_t cl, cl_t *cp1, cl_t *cp2, int fatnum)
345 cl, rsrvdcltype(*cp1));
353 cl, rsrvdcltype(*cp1), rsrvdcltype(*cp2), fatnum);
365 cl, rsrvdcltype(*cp1), *cp2, fatnum);
378 cl, *cp1, rsrvdcltype(*cp2), fatnum);
390 cl, *cp1, *cp2, fatnum);
410 cl_t cl;
413 for (cl = CLUST_FIRST; cl < boot->NumClusters; cl++)
414 if (first[cl].next != second[cl].next)
415 ret |= clustdiffer(cl, &first[cl].next, &second[cl].next, fatnum);
556 cl_t cl;
614 for (cl = CLUST_FIRST; cl < boot->NumClusters; cl++) {
617 if (fat[cl].next == CLUST_FREE)
619 *p++ = (u_char)fat[cl].next;
620 *p++ = (u_char)(fat[cl].next >> 8);
621 *p++ = (u_char)(fat[cl].next >> 16);
623 *p++ |= (fat[cl].next >> 24)&0x0f;
626 if (fat[cl].next == CLUST_FREE)
628 *p++ = (u_char)fat[cl].next;
629 *p++ = (u_char)(fat[cl].next >> 8);
632 if (fat[cl].next == CLUST_FREE)
634 if (cl + 1 < boot->NumClusters
635 && fat[cl + 1].next == CLUST_FREE)
637 *p++ = (u_char)fat[cl
638 *p++ = (u_char)((fat[cl].next >> 8) & 0xf)
639 |(u_char)(fat[cl+1].next << 4);
640 *p++ = (u_char)(fat[++cl].next >> 4);