diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-28 16:18:13 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-06-28 16:18:13 -0700 |
| commit | 725d715a1bcaa5f7c05fd64c1b9da87768b1cbc0 (patch) | |
| tree | 256bc14063c3d49a502efd0200dcac7816a7d026 /esp8266 | |
| parent | 1e16e813e8f1f4534db75a6cc251ffaef76e2162 (diff) | |
shared-bindings: Introduce storage.remount() so you can set root as
writeable and prevent USB from editing it.
Diffstat (limited to 'esp8266')
| -rw-r--r-- | esp8266/Makefile | 1 | ||||
| -rw-r--r-- | esp8266/common-hal/storage/__init__.c | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/esp8266/Makefile b/esp8266/Makefile index 168e74383..071e202d4 100644 --- a/esp8266/Makefile +++ b/esp8266/Makefile @@ -118,6 +118,7 @@ SRC_COMMON_HAL = \ busio/UART.c \ neopixel_write/__init__.c \ os/__init__.c \ + storage/__init__.c \ time/__init__.c \ board/__init__.c diff --git a/esp8266/common-hal/storage/__init__.c b/esp8266/common-hal/storage/__init__.c new file mode 100644 index 000000000..a4c3a387a --- /dev/null +++ b/esp8266/common-hal/storage/__init__.c @@ -0,0 +1,34 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include <string.h> + +#include "py/runtime.h" +#include "shared-bindings/storage/__init__.h" + +void common_hal_storage_remount(const char* mount_path, bool readonly) { + mp_raise_NotImplementedError(""); +} |
