summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorAyan Pahwa <iayanpahwa@gmail.com>2019-11-25 22:31:01 +0530
committerAyan Pahwa <iayanpahwa@gmail.com>2019-11-25 22:31:01 +0530
commit9c6466cffb0ac3a303e49bd0b685a47807a30367 (patch)
treef5ed35b434920f363fa08ca8f425612c16ca8a28 /supervisor
parent180b485f8b109baf64252a4b9793a37377af8c25 (diff)
Fix build failure for boards with less memory
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/filesystem.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c
index b4f6d8bb9..6745c496d 100644
--- a/supervisor/shared/filesystem.c
+++ b/supervisor/shared/filesystem.c
@@ -71,14 +71,13 @@ static void make_empty_file(FATFS *fatfs, const char *path) {
static void make_sample_code_file(FATFS *fatfs) {
- FIL fs;
- UINT char_written = 0;
- const byte buffer[] = "print('Hello World!')\n";
-
#if CIRCUITPY_FULL_BUILD == 0
- make_empty_file(&vfs_fat->fatfs, "/code.py");
+ make_empty_file(fatfs, "/code.py");
#else
+ FIL fs;
+ UINT char_written = 0;
+ const byte buffer[] = "print('Hello World!')\n";
//Create or modify existing code.py file
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);