summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-12 13:18:48 +0100
committerDamien George <damien.p.george@gmail.com>2016-05-12 13:18:48 +0100
commit47bf6ba61a2f332b44471badd1e50658ae7d264c (patch)
tree717de52e174b3ca63e5371b8b335c917075c56b7 /py
parent0d6d315ba6c36cc493c844f69a898469bf231abc (diff)
downloadmicropython-47bf6ba61a2f332b44471badd1e50658ae7d264c.tar.gz
micropython-47bf6ba61a2f332b44471badd1e50658ae7d264c.zip
py/moduerrno: Add more constants to the errno module.
Diffstat (limited to 'py')
-rw-r--r--py/moduerrno.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/py/moduerrno.c b/py/moduerrno.c
index bc2bcfc96f..826f52d2ea 100644
--- a/py/moduerrno.c
+++ b/py/moduerrno.c
@@ -32,12 +32,27 @@
#if MICROPY_PY_UERRNO
+// This list could be defined per port in mpconfigport.h to tailor it to a
+// specific port's needs. But for now we have a common list.
#define ERRNO_LIST \
X(EPERM) \
X(ENOENT) \
X(EIO) \
+ X(EBADF) \
X(EAGAIN) \
+ X(ENOMEM) \
+ X(ENODEV) \
+ X(EINVAL) \
+ X(EOPNOTSUPP) \
+ X(EADDRINUSE) \
+ X(ECONNABORTED) \
+ X(ECONNRESET) \
+ X(ENOBUFS) \
+ X(ENOTCONN) \
X(ETIMEDOUT) \
+ X(EHOSTUNREACH) \
+ X(EALREADY) \
+ X(EINPROGRESS) \
STATIC const mp_rom_map_elem_t errorcode_table[] = {
#define X(e) { MP_ROM_INT(MP_ ## e), MP_ROM_QSTR(MP_QSTR_## e) },