diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-02-21 17:15:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-21 17:15:50 -0500 |
| commit | d218069f03451e74e049b337830cbd1be7a25d8e (patch) | |
| tree | 12ea8d89c81889671baba36cd3668c0ca2536023 /shared-module | |
| parent | 3e877e0f6a05083980d5829e8fcc948a14642d58 (diff) | |
| parent | ed1ace09e971b24bc9ff88defe2e128064780824 (diff) | |
Merge pull request #1584 from tannewt/disable_concurrent_write_protection
Add option to disable the concurrent write protection
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/storage/__init__.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index f09edd785..215e1356a 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -143,7 +143,7 @@ mp_obj_t common_hal_storage_getmount(const char *mount_path) { return storage_object_from_path(mount_path); } -void common_hal_storage_remount(const char *mount_path, bool readonly) { +void common_hal_storage_remount(const char *mount_path, bool readonly, bool disable_concurrent_write_protection) { if (strcmp(mount_path, "/") != 0) { mp_raise_OSError(MP_EINVAL); } @@ -156,7 +156,8 @@ void common_hal_storage_remount(const char *mount_path, bool readonly) { } #endif - supervisor_flash_set_usb_writable(readonly); + filesystem_set_internal_writable_by_usb(readonly); + filesystem_set_internal_concurrent_write_protection(!disable_concurrent_write_protection); } void common_hal_storage_erase_filesystem(void) { |
