10000 3.0: boot.py change of filesystem writability would get overridden. by dhalbert · Pull Request #811 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

3.0: boot.py change of filesystem writability would get overridden. #811

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ int __attribute__((used)) main(void) {
filesystem_writable_by_python(true);
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);

// Switch the filesystem back to non-writable by Python now instead of later,
// since boot.py might change it back to writable.
filesystem_writable_by_python(false);

// Write version info to boot_out.txt.
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
mp_hal_stdout_tx_str("\r\n");
Expand All @@ -327,7 +331,6 @@ int __attribute__((used)) main(void) {
filesystem_flush();
boot_output_file = NULL;
}
filesystem_writable_by_python(false);
#endif

// Reset to remove any state that boot.py setup. It should only be used to
Expand Down
0