Lines Matching full: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;
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;
471 fat[p].head = head;
475 /* the head record gets the length */
476 fat[head].length = fat[head].next == CLUST_FREE ? 0 : len;
484 for (head = CLUST_FIRST; head < boot->NumClusters; head++) {
486 if (fat[head].head != head)
490 for (p = head;
493 if (fat[n].head != head)
500 head, rsrvdcltype(n));
501 ret |= tryclear(boot, fat, head, &fat[p].next);
506 head, n);
507 ret |= tryclear(boot, fat, head, &fat[p].next);
511 head, fat[n].head, n);
512 conf = tryclear(boot, fat, head, &fat[p].next);
513 if (ask(1, "Clear chain starting at %u", h = fat[n].head)) {
521 if (h != fat[p].head) {
525 head--;
528 fat[p].head = head;
654 cl_t head;
658 for (head = CLUST_FIRST; head < boot->NumClusters; head++) {
660 if (fat[head].head != head
661 || fat[head].next == CLUST_FREE
662 || (fat[head].next >= CLUST_RSRVD
663 && fat[head].next < CLUST_EOFS)
664 || (fat[head].flags & FAT_USED))
668 head, fat[head].length);
669 mod |= ret = reconnect(dosfs, boot, fat, head);
674 clearchain(boot, fat, head);
679 clearchain(boot, fat, head);
699 for (head = CLUST_FIRST; head < boot->NumClusters; head++)
700 if (fat[head].next == CLUST_FREE) {
701 boot->FSNext = head;