1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Flight/PiOS: this patch makes dosfs work with both MBR and VBR formats. Backup your SD files in case this messes something!! Testing needed.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1798 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
sambas 2010-09-29 16:29:38 +00:00 committed by sambas
parent 4e3325f3ba
commit 2d90a80e22

View File

@ -40,6 +40,12 @@ uint32_t DFS_GetPtnStart(uint8_t unit, uint8_t *scratchsector, uint8_t pnum, uin
return DFS_ERRMISC;
}
// check if jump to boot, VBR
if(mbr->bootcode[0]==0xEB || mbr->bootcode[0]==0xE9){
// MBR is actually VBR
return 0;
}
result = (uint32_t) mbr->ptable[pnum].start_0 |
(((uint32_t) mbr->ptable[pnum].start_1) << 8) |
(((uint32_t) mbr->ptable[pnum].start_2) << 16) |