Skip to content

Commit

Permalink
Improve IRIX errno
Browse files Browse the repository at this point in the history
1. nixdoc.net had certificate errors (and I
   think I've seen that happen before?)
2. found a source mirror to scrape finally
   (and found new errno there!)
  • Loading branch information
mentalisttraceur committed May 1, 2023
1 parent 8dd0077 commit 0c9a356
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 5 deletions.
30 changes: 30 additions & 0 deletions errnoname.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ char const * errnoname(int errno_)
#ifdef EGRATUITOUS
[EGRATUITOUS] = "EGRATUITOUS",
#endif
#ifdef EGRBUSY
[EGRBUSY] = "EGRBUSY",
#endif
#ifdef EGREGIOUS
[EGREGIOUS] = "EGREGIOUS",
#endif
Expand Down Expand Up @@ -474,6 +477,9 @@ char const * errnoname(int errno_)
#ifdef EINIT
[EINIT] = "EINIT",
#endif
#ifdef EINODETABLEFULL
[EINODETABLEFULL] = "EINODETABLEFULL",
#endif
#ifdef EINPROG
#if !defined(EINPROGRESS) || EINPROG != EINPROGRESS
[EINPROG] = "EINPROG",
Expand Down Expand Up @@ -941,6 +947,12 @@ char const * errnoname(int errno_)
#ifdef ENOEXEC
[ENOEXEC] = "ENOEXEC",
#endif
#ifdef ENOFPA
[ENOFPA] = "ENOFPA",
#endif
#ifdef ENOGR
[ENOGR] = "ENOGR",
#endif
#ifdef ENOGRACE
[ENOGRACE] = "ENOGRACE",
#endif
Expand Down Expand Up @@ -1317,6 +1329,9 @@ char const * errnoname(int errno_)
#ifdef ETERM
[ETERM] = "ETERM",
#endif
#ifdef ETEXTABLEFULL
[ETEXTABLEFULL] = "ETEXTABLEFULL",
#endif
#ifdef ETIME
[ETIME] = "ETIME",
#endif
Expand Down Expand Up @@ -1773,6 +1788,9 @@ char const * errnoname(int errno_)
#ifdef EGRATUITOUS
case EGRATUITOUS: return "EGRATUITOUS";
#endif
#ifdef EGRBUSY
case EGRBUSY: return "EGRBUSY";
#endif
#ifdef EGREGIOUS
case EGREGIOUS: return "EGREGIOUS";
#endif
Expand Down Expand Up @@ -1860,6 +1878,9 @@ char const * errnoname(int errno_)
#ifdef EINIT
case EINIT: return "EINIT";
#endif
#ifdef EINODETABLEFULL
case EINODETABLEFULL: return "EINODETABLEFULL";
#endif
#ifdef EINPROG
#if !defined(EINPROGRESS) || EINPROG != EINPROGRESS
case EINPROG: return "EINPROG";
Expand Down Expand Up @@ -2327,6 +2348,12 @@ char const * errnoname(int errno_)
#ifdef ENOEXEC
case ENOEXEC: return "ENOEXEC";
#endif
#ifdef ENOFPA
case ENOFPA: return "ENOFPA";
#endif
#ifdef ENOGR
case ENOGR: return "ENOGR";
#endif
#ifdef ENOGRACE
case ENOGRACE: return "ENOGRACE";
#endif
Expand Down Expand Up @@ -2703,6 +2730,9 @@ char const * errnoname(int errno_)
#ifdef ETERM
case ETERM: return "ETERM";
#endif
#ifdef ETEXTABLEFULL
case ETEXTABLEFULL: return "ETEXTABLEFULL";
#endif
#ifdef ETIME
case ETIME: return "ETIME";
#endif
Expand Down
5 changes: 5 additions & 0 deletions for-maintainers/errno-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ EFSCORRUPTED
EFTYPE
EGENERIC
EGRATUITOUS
EGRBUSY
EGREGIOUS
EHOSTDOWN
EHOSTNOTFOUND
Expand Down Expand Up @@ -150,6 +151,7 @@ EIDRM
EIEIO
EILSEQ
EINIT
EINODETABLEFULL
EINPROG
EINPROGRESS
EINTEGRITY
Expand Down Expand Up @@ -305,6 +307,8 @@ ENODEV
ENODUST
ENOENT
ENOEXEC
ENOFPA
ENOGR
ENOGRACE
ENOIOCTL
ENOIOCTLCMD
Expand Down Expand Up @@ -429,6 +433,7 @@ ESUBTASKINVALID
ESUBTASKNOTACTIVE
ESYSERROR
ETERM
ETEXTABLEFULL
ETIME
ETIMEDOUT
ETOOMANYREFS
Expand Down
15 changes: 10 additions & 5 deletions for-maintainers/gather-errno-names.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,16 @@ hpux()

irix()
{
# SGI no longer exists and IRIX is discontinued but was
# not open-sourced, so we use a public manpage mirror:

get https://nixdoc.net/man-pages/IRIX/man2/intro.2.html \
| sed 's/\t/ /g; s/ */ /g' | grep '[1-9][0-9]* *E' | cut -d' ' -f3
# SGI no longer exists and IRIX is discontinued so we
# use a GitHub mirror of the source (newest I found):
github JohnDTX/irix-3.x-src/main/sys/h/errno.h | extract_c &

# These four errno show up on the public manpage mirror
# https://nixdoc.net/man-pages/IRIX/man2/intro.2.html
printf '%s\n' ECKPT
printf '%s\n' EFSCORRUPTED
printf '%s\n' ENFSREMOTE
printf '%s\n' EWRONGFS
}

ultrix()
Expand Down
15 changes: 15 additions & 0 deletions variant-for-readable-vendoring/errnoname-array-elements.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@
#ifdef EGRATUITOUS
[EGRATUITOUS] = "EGRATUITOUS",
#endif
#ifdef EGRBUSY
[EGRBUSY] = "EGRBUSY",
#endif
#ifdef EGREGIOUS
[EGREGIOUS] = "EGREGIOUS",
#endif
Expand Down Expand Up @@ -460,6 +463,9 @@
#ifdef EINIT
[EINIT] = "EINIT",
#endif
#ifdef EINODETABLEFULL
[EINODETABLEFULL] = "EINODETABLEFULL",
#endif
#ifdef EINPROG
#if !defined(EINPROGRESS) || EINPROG != EINPROGRESS
[EINPROG] = "EINPROG",
Expand Down Expand Up @@ -927,6 +933,12 @@
#ifdef ENOEXEC
[ENOEXEC] = "ENOEXEC",
#endif
#ifdef ENOFPA
[ENOFPA] = "ENOFPA",
#endif
#ifdef ENOGR
[ENOGR] = "ENOGR",
#endif
#ifdef ENOGRACE
[ENOGRACE] = "ENOGRACE",
#endif
Expand Down Expand Up @@ -1303,6 +1315,9 @@
#ifdef ETERM
[ETERM] = "ETERM",
#endif
#ifdef ETEXTABLEFULL
[ETEXTABLEFULL] = "ETEXTABLEFULL",
#endif
#ifdef ETIME
[ETIME] = "ETIME",
#endif
Expand Down
15 changes: 15 additions & 0 deletions variant-for-readable-vendoring/errnoname-switch-cases.c.inc
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@
#ifdef EGRATUITOUS
case EGRATUITOUS: return "EGRATUITOUS";
#endif
#ifdef EGRBUSY
case EGRBUSY: return "EGRBUSY";
#endif
#ifdef EGREGIOUS
case EGREGIOUS: return "EGREGIOUS";
#endif
Expand Down Expand Up @@ -460,6 +463,9 @@
#ifdef EINIT
case EINIT: return "EINIT";
#endif
#ifdef EINODETABLEFULL
case EINODETABLEFULL: return "EINODETABLEFULL";
#endif
#ifdef EINPROG
#if !defined(EINPROGRESS) || EINPROG != EINPROGRESS
case EINPROG: return "EINPROG";
Expand Down Expand Up @@ -927,6 +933,12 @@
#ifdef ENOEXEC
case ENOEXEC: return "ENOEXEC";
#endif
#ifdef ENOFPA
case ENOFPA: return "ENOFPA";
#endif
#ifdef ENOGR
case ENOGR: return "ENOGR";
#endif
#ifdef ENOGRACE
case ENOGRACE: return "ENOGRACE";
#endif
Expand Down Expand Up @@ -1303,6 +1315,9 @@
#ifdef ETERM
case ETERM: return "ETERM";
#endif
#ifdef ETEXTABLEFULL
case ETEXTABLEFULL: return "ETEXTABLEFULL";
#endif
#ifdef ETIME
case ETIME: return "ETIME";
#endif
Expand Down

0 comments on commit 0c9a356

Please sign in to comment.