summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAyke van Laethem <aykevanlaethem@gmail.com>2018-04-29 14:48:16 +0200
committerDamien George <damien.p.george@gmail.com>2018-07-18 17:12:26 +1000
commit635064c432b15407a29a78158d31108a4152fbde (patch)
tree3f25b8c1b13984e28acc1f3d48dfe41908fd2c23
parent1aa9ff914194824a78a8b010572ad7083c1bb4ec (diff)
nrf/modules/uos/microbitfs: Fix errno defines.
Probably broken after the recent Clang fixes to errno.h.
-rw-r--r--ports/nrf/modules/uos/microbitfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ports/nrf/modules/uos/microbitfs.c b/ports/nrf/modules/uos/microbitfs.c
index cfc2ee4d9..1750262aa 100644
--- a/ports/nrf/modules/uos/microbitfs.c
+++ b/ports/nrf/modules/uos/microbitfs.c
@@ -404,7 +404,7 @@ STATIC int advance(file_descriptor_obj *self, uint32_t n, bool write) {
if (next_chunk == FILE_NOT_FOUND) {
clear_file(self->start_chunk);
self->open = false;
- return ENOSPC;
+ return MP_ENOSPC;
}
// Link next chunk to this one
flash_write_byte((uint32_t)&(file_system_chunks[self->seek_chunk].next_chunk), next_chunk);
@@ -420,7 +420,7 @@ STATIC mp_uint_t microbit_file_read(mp_obj_t obj, void *buf, mp_uint_t size, int
file_descriptor_obj *self = (file_descriptor_obj *)obj;
check_file_open(self);
if (self->writable || file_system_chunks[self->start_chunk].marker == FREED_CHUNK) {
- *errcode = EBADF;
+ *errcode = MP_EBADF;
return MP_STREAM_ERROR;
}
uint32_t bytes_read = 0;
@@ -450,7 +450,7 @@ STATIC mp_uint_t microbit_file_write(mp_obj_t obj, const void *buf, mp_uint_t si
file_descriptor_obj *self = (file_descriptor_obj *)obj;
check_file_open(self);
if (!self->writable || file_system_chunks[self->start_chunk].marker == FREED_CHUNK) {
- *errcode = EBADF;
+ *errcode = MP_EBADF;
return MP_STREAM_ERROR;
}
uint32_t len = size;