Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 50 of file ff_format.c.
Referenced by FF_FormatPartition().
{ FF_T_SINT8 count = 0; FF_T_SINT8 part; // Check PBR or MBR signature if (FF_getChar(pBuffer, FF_FAT_MBR_SIGNATURE) != 0x55 && FF_getChar(pBuffer, FF_FAT_MBR_SIGNATURE) != 0xAA ) { // No MBR, but is it a PBR ? if (FF_getChar(pBuffer, 0) == 0xEB && // PBR Byte 0 FF_getChar(pBuffer, 2) == 0x90 && // PBR Byte 2 (FF_getChar(pBuffer, 21) & 0xF0) == 0xF0) {// PBR Byte 21 : Media byte return 1; // No MBR but PBR exist then only one partition } return 0; // No MBR and no PBR then no partition found } for (part = 0; part < 4; part++) { FF_T_UINT8 active = FF_getChar(pBuffer, FF_FAT_PTBL + FF_FAT_PTBL_ACTIVE + (16 * part)); FF_T_UINT8 part_id = FF_getChar(pBuffer, FF_FAT_PTBL + FF_FAT_PTBL_ID + (16 * part)); // The first sector must be a MBR, then check the partition entry in the MBR if (active != 0x80 && (active != 0 || part_id == 0)) { break; } count++; } return count; }