-
Notifications
You must be signed in to change notification settings - Fork 3k
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
MBRBlockDevice: When partitioning, clear the rest of first erase unit #9384
Conversation
} | ||
if (table_start_offset + sizeof(struct mbr_table) < buffer_size) { | ||
memset(buffer + table_start_offset + sizeof(struct mbr_table), 0xFF, | ||
buffer_size - (table_start_offset + + sizeof(struct mbr_table))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
- ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* * ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
double plus ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like a typo:
buffer_size - (table_start_offset + + sizeof(struct mbr_table)));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch. Fixed. Not a bug though. :)
This targeting 5.11.2 ,correct? |
@davidsaada Why aren't you using the Reviewers section in the template ? Designed specifically so that individuals can be tagged and have the script auto assign them as reviewers . Is your Master out of date ? |
Make sure all the parts of the first erase unit, that are not part of the partition table are clear.
1bdd193
to
af23e3f
Compare
Indeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok to me
Thanks @adbridge I'm aware of it. Those folks were quoted there not for review sake, but in order for them to use this PR for the tests. Would like the "regular" folks to review this PR. |
Excellent, can we pull this to the 5.11.2 RC? @adbridge |
Let me prepare the CI queue for this one to get in asap (while travis finishes) |
CI started |
@JanneKiiskila Once this passes CI we will cherry pick across to the RC for 5.11.2. Once that has been done we will need to re-run CI on the RC. Can we have someone also on standby to do the same for the client tests ? |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
MBRBlockDevice: When partitioning, clear the rest of first erase unit
Description
In MBRBlockDevice, when performing the partition operation, make sure that the rest of the first erase unit (one that holds the partition table) is cleared. This serves for ensuring that no other data (like previously programmed file systems) is present in this erase unit. Trigger for this PR was a failures in CI, which alternately programmed LittleFS (without MBR) and FAT FS (with MBR), making LittleFS think that the FAT format was a valid one.
Pull request type