Skip to content

Commit 46a61e6

Browse files
Provide filesystem stubs to fit in with changes from 41d494d
filesystem stub implementation is used when DISABLE_FILESYSTEM is set.
1 parent 9c6e34d commit 46a61e6

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

supervisor/stub/filesystem.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626

2727
#include "supervisor/filesystem.h"
2828

29+
30+
void filesystem_background(void) {
31+
return;
32+
}
33+
2934
bool filesystem_init(bool create_allowed, bool force_create) {
3035
(void)create_allowed;
3136
(void)force_create;
@@ -35,11 +40,37 @@ bool filesystem_init(bool create_allowed, bool force_create) {
3540
void filesystem_flush(void) {
3641
}
3742

43+
void filesystem_set_internal_writable_by_usb(bool writable) {
44+
(void)writable;
45+
return;
46+
}
47+
48+
void filesystem_set_writable_by_usb(fs_user_mount_t *vfs, bool usb_writable) {
49+
(void)vfs;
50+
(void)usb_writable;
51+
return;
52+
}
53+
3854
bool filesystem_is_writable_by_python(fs_user_mount_t *vfs) {
3955
(void)vfs;
4056
return true;
4157
}
4258

59+
bool filesystem_is_writable_by_usb(fs_user_mount_t *vfs) {
60+
return true;
61+
}
62+
63+
void filesystem_set_internal_concurrent_write_protection(bool concurrent_write_protection) {
64+
(void)concurrent_write_protection;
65+
return;
66+
}
67+
68+
void filesystem_set_concurrent_write_protection(fs_user_mount_t *vfs, bool concurrent_write_protection) {
69+
(void)vfs;
70+
(void)concurrent_write_protection;
71+
return;
72+
}
73+
4374
bool filesystem_present(void) {
4475
return false;
4576
}

supervisor/supervisor.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ SRC_SUPERVISOR = \
55
supervisor/shared/background_callback.c \
66
supervisor/shared/board.c \
77
supervisor/shared/cpu.c \
8-
supervisor/shared/filesystem.c \
98
supervisor/shared/flash.c \
109
supervisor/shared/lock.c \
1110
supervisor/shared/memory.c \
@@ -17,6 +16,12 @@ SRC_SUPERVISOR = \
1716
supervisor/shared/traceback.c \
1817
supervisor/shared/translate.c
1918

19+
ifeq ($(DISABLE_FILESYSTEM),1)
20+
SRC_SUPERVISOR += supervisor/stub/filesystem.c
21+
else
22+
SRC_SUPERVISOR += supervisor/shared/filesystem.c
23+
endif
24+
2025
NO_USB ?= $(wildcard supervisor/usb.c)
2126

2227
INTERNAL_FLASH_FILESYSTEM ?= 0

0 commit comments

Comments
 (0)