Skip to content
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

unmounted filesystems start as ejected #3862

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

dhalbert
Copy link
Collaborator

Fixes #3709.

Undoes bda3267 from #3680. The problem is that a board that starts unconnected does not start with unejected drives; they should be ejected when boot.py is entered.

The original change saved 20 bytes. I tried reversing the sense of the ejected[] array, calling it not_ejected[]. (mounted was too confusing, because it has two meanings: one for TinyUSB, and one for the filesystem.) But the code was harder to read and the change caused the addition of a little extra code elsewhere to reverse the sense of various tests. So it ended up that only 12 bytes were saved. I think that was not worth the cost of harder-to-read-code.

This fix is only needed for main: the original change was done after 6.0.0.

Tested via boot.py on a QTPy.

@dhalbert dhalbert requested a review from tannewt December 22, 2020 04:22
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit 8b5b602 into adafruit:main Dec 22, 2020
@dhalbert dhalbert deleted the storage-remount branch February 25, 2021 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage.remount("/", True) resulting in RuntimeError on 6.1.0-beta.2
2 participants