Home | History | Annotate | Download | only in block

Lines Matching defs:fat

326     array_t fat,directory,mapping;
505 /* fat functions */
540 uint32_t* entry=array_get(&(s->fat),cluster);
543 uint16_t* entry=array_get(&(s->fat),cluster);
547 unsigned char* p = array_get(&(s->fat), offset);
564 uint32_t* entry=array_get(&(s->fat),cluster);
567 uint16_t* entry=array_get(&(s->fat),cluster);
570 const uint8_t* x=(uint8_t*)(s->fat.pointer)+cluster*3/2;
585 array_init(&(s->fat),1);
586 array_ensure_allocated(&(s->fat),
589 array_init(&(s->fat),(s->fat_type==32?4:2));
590 array_ensure_allocated(&(s->fat),
591 s->sectors_per_fat * 0x200 / s->fat.item_size - 1);
593 memset(s->fat.pointer,0,s->fat.size);
874 /* Now build FAT, and write back information into directory */
894 /* MS-DOS expects the FAT to be 0 for the root directory
930 fprintf(stderr,"Directory does not fit in FAT%d (capacity %s)\n",
938 /* fix fat for entry */
951 /* the FAT signature */
969 s->fat.pointer[0] = bootsector->media_type;
1029 if (!strstart(dirname, "fat:", NULL))
1043 fprintf(stderr, "Big fat greek warning: FAT32 has not been tested. You are welcome to do so!\n");
1309 memcpy(buf+i*0x200,&(s->fat.pointer[(sector_num-s->first_sectors_number)*0x200]),0x200);
1311 memcpy(buf+i*0x200,&(s->fat.pointer[(sector_num-s->first_sectors_number-s->sectors_per_fat)*0x200]),0x200);
1830 /* check file size with FAT */
1859 * - get modified FAT
1864 * - check that the FAT agrees with the size
1868 * FAT
1874 memcpy(s->fat2, s->fat.pointer, size);
1879 fprintf(stderr, "Could not copy fat\n");
1907 DLOG(fprintf(stderr, "FAT was modified (%d), but cluster is not used?\n", i));
2047 * to the modified fat, and the corresponding entries in s->mapping are
2584 * - copy FAT (with bdrv_read)
2606 /* copy FAT (with bdrv_read) */
2607 memcpy(s->fat.pointer, s->fat2, 0x200 * s->sectors_per_fat);
2785 set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
2809 array_free(&(s->fat));
2824 .protocol_name = "fat",