David Cantrell <[EMAIL PROTECTED]> wrote:
>> Two examples:
>> ==========================================
>>
>> static int
>> _test_code_bad (const FatTable* ft, FatCluster code)
>> {
>>      switch (ft->fat_type) {
>>              case FAT_TYPE_FAT16:
>>              if (code == 0xfff7) return 1;
>>              break;
>>
>>              case FAT_TYPE_FAT32:
>>              if (code == 0x0ffffff7) return 1;
>>              break;
>>      }
>>      return 0;
>> }

Thanks again for the pointers.

> Add:
>
> case FAT_TYPE_FAT12:
> if (code == 0xff0) return 1;

Hmm...
it looks like doc/FAT is saying to use 0xff7 there:

    * bad cluster (0xff7 for FAT12, 0xfff7 for FAT16, 0x0ffffff7 for FAT32).
    Indicates the disk is physically damaged where the cluster is stored.

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to