Home | History | Annotate | Download | only in fsck_msdos

Lines Matching defs:head

420 clearchain(struct bootblock *boot, struct fatEntry *fat, cl_t head)
424 for (p = head; p >= CLUST_FIRST && p < boot->NumClusters; p = q) {
425 if (fat[p].head != head)
428 fat[p].next = fat[p].head = CLUST_FREE;
434 tryclear(struct bootblock *boot, struct fatEntry *fat, cl_t head, cl_t *trunc)
436 if (ask(1, "Clear chain starting at %u", head)) {
437 clearchain(boot, fat, head);
452 cl_t head, p, h, n, wdk;
460 for (head = CLUST_FIRST; head < boot->NumClusters; head++) {
462 if (fat[head].head != 0 /* cluster already belongs to some chain */
463 || fat[head].next == CLUST_FREE
464 || fat[head].next == CLUST_BAD)
468 for (len = 0, p = head;
473 printf("detect cluster chain loop: head %u for p %u\n", head, p);
477 fat[p].head = head;
481 /* the head record gets the length */
482 fat[head].length = fat[head].next == CLUST_FREE ? 0 : len;
490 for (head = CLUST_FIRST; head < boot->NumClusters; head++) {
492 if (fat[head].head != head)
497 for (p = head,wdk=boot->NumClusters;
500 if (fat[n].head != head)
509 head, rsrvdcltype(n));
510 ret |= tryclear(boot, fat, head, &fat[p].next);
515 head, n);
516 ret |= tryclear(boot, fat, head, &fat[p].next);
520 head, fat[n].head, n);
521 conf = tryclear(boot, fat, head, &fat[p].next);
522 if (ask(1, "Clear chain starting at %u", h = fat[n].head)) {
530 if (h != fat[p].head) {
534 head--;
537 fat[p].head = head;
663 cl_t head;
667 for (head = CLUST_FIRST; head < boot->NumClusters; head++) {
669 if (fat[head].head != head
670 || fat[head].next == CLUST_FREE
671 || (fat[head].next >= CLUST_RSRVD
672 && fat[head].next < CLUST_EOFS)
673 || (fat[head].flags & FAT_USED))
677 head, fat[head].length);
678 mod |= ret = reconnect(dosfs, boot, fat, head);
683 clearchain(boot, fat, head);
688 clearchain(boot, fat, head);
710 for (head = CLUST_FIRST; head < boot->NumClusters; head++)
711 if (fat[head].next == CLUST_FREE) {
712 boot->FSNext = head;
729 for (head = CLUST_FIRST; head < boot->NumClusters; head++)
730 if (fat[head].next == CLUST_FREE) {
731 boot->FSNext = head;