-
Notifications
You must be signed in to change notification settings - Fork 3k
storage: fix valid partion check with windows formatted sd card #8346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
For Windows-formatted SD card, it is not partitioned (no MBR), but its PBR has the same boot signature (0xaa55) as MBR. We would easily mis-recognize this SD card has valid partitions if we only check partition type. We add check by only accepting 0x00 (inactive) /0x80 (active) for valid partition status.
@ARMmbed/mbed-os-storage Please review |
Reminder to review this one |
@geky can you help with this one? |
@ccli8 Can you rephrase : |
This is a good idea 👍 Thanks for submitting a PR. |
@0xc0170 Rephrase what? |
The titles are used in the release notes. I would rephrase to similar |
/morph build |
Build : SUCCESSBuild number : 3466 Triggering tests/morph test |
@0xc0170 I change the title to |
Exporter Build : SUCCESSBuild number : 3089 |
Test : SUCCESSBuild number : 3257 |
Description
For Windows-formatted SD card, it is not partitioned (no MBR), but its PBR has the same boot signature (
0xaa55
) as MBR.MBRBlockDevice
would easily mis-recognize this SD card has valid partitions if only partition type is checked. This PR adds check by only accepting0x00
(inactive)/0x80
(active) for valid partition status.