From 76aa9ad07d1bfdce072c8b4e1ecd18e6077e6c41 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 14 Jan 2007 16:47:03 +0000 Subject: 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. --- src/hci/strerror.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/hci') diff --git a/src/hci/strerror.c b/src/hci/strerror.c index c130d6ca2..799f1631a 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" }, +}; -- cgit v1.2.3-55-g7522