Lines Matching refs: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);
875 /* Now build FAT, and write back information into directory */
895 /* MS-DOS expects the FAT to be 0 for the root directory
931 fprintf(stderr,"Directory does not fit in FAT%d (capacity %s)\n",
939 /* fix fat for entry */
952 /* the FAT signature */
970 s->fat.pointer[0] = bootsector->media_type;
1030 if (!strstart(dirname, "fat:", NULL))
1044 fprintf(stderr, "Big fat greek warning: FAT32 has not been tested. You are welcome to do so!\n");
1314 memcpy(buf+i*0x200,&(s->fat.pointer[(sector_num-s->first_sectors_number)*0x200]),0x200);
1316 memcpy(buf+i*0x200,&(s->fat.pointer[(sector_num-s->first_sectors_number-s->sectors_per_fat)*0x200]),0x200);
1835 /* check file size with FAT */
1864 * - get modified FAT
1869 * - check that the FAT agrees with the size
1873 * FAT
1879 memcpy(s->fat2, s->fat.pointer, size);
1884 fprintf(stderr, "Could not copy fat\n");
1912 DLOG(fprintf(stderr, "FAT was modified (%d), but cluster is not used?\n", i));
2052 * to the modified fat, and the corresponding entries in s->mapping are
2596 * - copy FAT (with bdrv_read)
2618 /* copy FAT (with bdrv_read) */
2619 memcpy(s->fat.pointer, s->fat2, 0x200 * s->sectors_per_fat);
2797 set_option_parameter(options, BLOCK_OPT_BACKING_FILE, "fat:");
2824 array_free(&(s->fat));
2839 .protocol_name = "fat",