nrf/modules/uos/microbitfs: Fix errno defines.

Probably broken after the recent Clang fixes to errno.h.
This commit is contained in:
Ayke van Laethem 2018-04-29 14:48:16 +02:00 committed by Damien George
parent 1aa9ff9141
commit 635064c432
1 changed files with 3 additions and 3 deletions

View File

@ -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;