summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/pybstdio.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-10 23:22:54 +0100
committerDamien George <damien.p.george@gmail.com>2016-05-10 23:30:39 +0100
commit5ab98d5c41bffa799a551a2731d904cab346898e (patch)
tree3e69611c73314b7e7c374172a9118e76e4b43dce /stmhal/pybstdio.c
parent088127d91cb593990cf4f04e64ca452671041e6f (diff)
downloadmicropython-5ab98d5c41bffa799a551a2731d904cab346898e.tar.gz
micropython-5ab98d5c41bffa799a551a2731d904cab346898e.zip
stmhal: Convert to use internal errno symbols; enable uerrno module.
Diffstat (limited to 'stmhal/pybstdio.c')
-rw-r--r--stmhal/pybstdio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stmhal/pybstdio.c b/stmhal/pybstdio.c
index 72c164b36d..352b7c10c2 100644
--- a/stmhal/pybstdio.c
+++ b/stmhal/pybstdio.c
@@ -26,10 +26,10 @@
#include <stdio.h>
#include <string.h>
-#include <errno.h>
#include "py/obj.h"
#include "py/stream.h"
+#include "py/mperrno.h"
#include "py/mphal.h"
// TODO make stdin, stdout and stderr writable objects so they can
@@ -69,7 +69,7 @@ STATIC mp_uint_t stdio_read(mp_obj_t self_in, void *buf, mp_uint_t size, int *er
}
return size;
} else {
- *errcode = EPERM;
+ *errcode = MP_EPERM;
return MP_STREAM_ERROR;
}
}
@@ -80,7 +80,7 @@ STATIC mp_uint_t stdio_write(mp_obj_t self_in, const void *buf, mp_uint_t size,
mp_hal_stdout_tx_strn_cooked(buf, size);
return size;
} else {
- *errcode = EPERM;
+ *errcode = MP_EPERM;
return MP_STREAM_ERROR;
}
}