summaryrefslogtreecommitdiff
path: root/firmware/common/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common/file.c')
-rw-r--r--firmware/common/file.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index ae5560407b..7f0e0cd9bd 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -184,6 +184,20 @@ int close(int fd)
184 return rc; 184 return rc;
185} 185}
186 186
187int remove(const char* name)
188{
189 int rc;
190 int fd = open(name, O_WRONLY);
191 if ( fd < 0 )
192 return fd;
193
194 rc = fat_remove(&(openfiles[fd].fatfile));
195
196 close(fd);
197
198 return rc;
199}
200
187static int readwrite(int fd, void* buf, int count, bool write) 201static int readwrite(int fd, void* buf, int count, bool write)
188{ 202{
189 int sectors; 203 int sectors;