hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/lib/errname.c
....@@ -20,6 +20,7 @@
2020 E(EADDRNOTAVAIL),
2121 E(EADV),
2222 E(EAFNOSUPPORT),
23
+ E(EAGAIN), /* EWOULDBLOCK */
2324 E(EALREADY),
2425 E(EBADE),
2526 E(EBADF),
....@@ -30,15 +31,17 @@
3031 E(EBADSLT),
3132 E(EBFONT),
3233 E(EBUSY),
33
-#ifdef ECANCELLED
34
- E(ECANCELLED),
35
-#endif
34
+ E(ECANCELED), /* ECANCELLED */
3635 E(ECHILD),
3736 E(ECHRNG),
3837 E(ECOMM),
3938 E(ECONNABORTED),
39
+ E(ECONNREFUSED), /* EREFUSED */
4040 E(ECONNRESET),
41
+ E(EDEADLK), /* EDEADLOCK */
42
+#if EDEADLK != EDEADLOCK /* mips, sparc, powerpc */
4143 E(EDEADLOCK),
44
+#endif
4245 E(EDESTADDRREQ),
4346 E(EDOM),
4447 E(EDOTDOT),
....@@ -165,14 +168,17 @@
165168 E(EUSERS),
166169 E(EXDEV),
167170 E(EXFULL),
168
-
169
- E(ECANCELED), /* ECANCELLED */
170
- E(EAGAIN), /* EWOULDBLOCK */
171
- E(ECONNREFUSED), /* EREFUSED */
172
- E(EDEADLK), /* EDEADLOCK */
173171 };
174172 #undef E
175173
174
+#ifdef EREFUSED /* parisc */
175
+static_assert(EREFUSED == ECONNREFUSED);
176
+#endif
177
+#ifdef ECANCELLED /* parisc */
178
+static_assert(ECANCELLED == ECANCELED);
179
+#endif
180
+static_assert(EAGAIN == EWOULDBLOCK); /* everywhere */
181
+
176182 #define E(err) [err - 512 + BUILD_BUG_ON_ZERO(err < 512 || err > 550)] = "-" #err
177183 static const char *names_512[] = {
178184 E(ERESTARTSYS),