summaryrefslogtreecommitdiffstats
path: root/boot.c
Commit message (Collapse)AuthorAgeFilesLines
* Detect exFAT filesystems and abort if foundKen Sumrall2013-06-261-0/+19
| | | | | | | | | | If fsck_msdos tries to fix an exFAT filesystem, it will damage it and it won't be mountable on systems that support exFAT. So just abort if the OEM name field is "EXFAT" or an invalid FAT32 Extended BIOS Parameter Block is detected. The test to detect an invalid BIOS Parameter Block was developed by Sony. Change-Id: I09e8457e399239e840c825b858a635a7d9462def
* Detect and handle invalid number of FATsSebastian Rasmussen2012-05-291-0/+4
| | | | | | | | | If the number of FATs field in the boot sector is zero, give an appropriate error code. Change-Id: I56545fb322a9d4c94aea8ddbd4879701617100e4 Signed-off-by: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
* Fix division-by-zero when reading partition tablesSebastian Rasmussen2012-05-071-6/+11
| | | | | | | | | | | | | When fsck_msdos was asked to analyze a device that contained a partition table in its first sector fsck_msdos was doing a division-by-zero because of mostly zeroed out fields. This fix postpones the division until it is necessary, while other tests already present detect the zeroed out fields and so fsck_msdos fails in a controlled fashion. Change-Id: Id2274b140449f4470f95a0215277f2f2de4cb7b0 Signed-off-by: Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Signed-off-by: christian bejram <christian.bejram@stericsson.com>
* fsck_msdos: Don't bail out when we find a FAT32 bootblock miscompare.San Mehat2009-06-271-6/+28
| | | | | | Some factory formatted sdcards seem to have a garbage backup block. Signed-off-by: San Mehat <san@google.com>
* fsck_msdos: Initial checkinSan Mehat2009-06-251-0/+272
Signed-off-by: San Mehat <san@google.com>