AnsweredAssumed Answered

Flash Drives Incorrectly Identified as Not DOS

Question asked by Ashley Clarke on Jun 26, 2018
Latest reply on Aug 19, 2018 by Daniel Chen

I'm using an MQX4.2 port with MFS.   I'm having problems with various different USB flash drives, partly because of the following, taken from MFS_Mount_drive_internal in mfs_mount.c

 

if ((boot_sector[0] != MFS_DOS30_JMP) && (boot_sector[0] != MFS_DOS30_B))
{
result = MFS_NOT_A_DOS_DISK;
}

On a lot of devices boot_sector[0] does not match either of the allowed values (0xEB or 0xE9) so we drop out.   If I expand this check to allow for other values - I've seen 0x33 and 0xFA so far - the code below causes the same return value:

 

bpb_sector_size = mqx_dtohs(bpb_ptr->SECTOR_SIZE);
if (bpb_sector_size % drive_ptr->SECTOR_SIZE)
{
result = MFS_NOT_A_DOS_DISK;
}

The disks in question are actually perfectly valid FAT32 formatted devices.   I'm not an MFS expert and I'm struggling to find a reliable definition of the values in question or what values are legitimate.   Some information on either would be welcome.   Has anybody else had a similar problem?

 

Thanks in advance

Outcomes