summaryrefslogtreecommitdiffstats
path: root/src/hci/strerror.c
diff options
context:
space:
mode:
authorMichael Brown2007-01-14 17:47:03 +0100
committerMichael Brown2007-01-14 17:47:03 +0100
commit76aa9ad07d1bfdce072c8b4e1ecd18e6077e6c41 (patch)
treef3117559872e973db34289a27f9f8e97ca31fb04 /src/hci/strerror.c
parentUse -ENETUNREACH to mean "no reachable network device exists, don't bother (diff)
downloadipxe-76aa9ad07d1bfdce072c8b4e1ecd18e6077e6c41.tar.gz
ipxe-76aa9ad07d1bfdce072c8b4e1ecd18e6077e6c41.tar.xz
ipxe-76aa9ad07d1bfdce072c8b4e1ecd18e6077e6c41.zip
Make TCP give up immediately when it receives -ENETUNREACH from
tcpip_tx(). This avoids the irritating wait when you accidentally type "kernel pxelinux.0" before bringing up the network interface. Add ENETUNREACH to strerror()'s list.
Diffstat (limited to 'src/hci/strerror.c')
-rw-r--r--src/hci/strerror.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/hci/strerror.c b/src/hci/strerror.c
index c130d6ca..799f1631 100644
--- a/src/hci/strerror.c
+++ b/src/hci/strerror.c
@@ -55,10 +55,13 @@ const char * strerror ( int errno ) {
}
/** The most common errors */
-struct errortab enoerr __errortab = { 0, "No error" };
-struct errortab enoem __errortab = { ENOMEM, "Out of memory" };
-struct errortab einval __errortab = { EINVAL, "Invalid argument" };
-struct errortab enospc __errortab = { ENOSPC, "No space left on device" };
-struct errortab eio __errortab = { EIO, "Input/output error" };
-struct errortab eacces __errortab = { EACCES, "Permission denied" };
-struct errortab enoent __errortab = { ENOENT, "File not found" };
+struct errortab common_errors[] __errortab = {
+ { 0, "No error" },
+ { ENOMEM, "Out of memory" },
+ { EINVAL, "Invalid argument" },
+ { ENOSPC, "No space left on device" },
+ { EIO, "Input/output error" },
+ { EACCES, "Permission denied" },
+ { ENOENT, "File not found" },
+ { ENETUNREACH, "Network unreachable" },
+};