summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2006-12-20 04:40:48 +0100
committerMichael Brown2006-12-20 04:40:48 +0100
commit84a2b886e16644f4fca157fcdb089b1994a8848c (patch)
tree2c5df46ca3c103884ef65b6dea2809f79cf60700
parentMove strerror() prototype to string.h, where it belongs (diff)
downloadipxe-84a2b886e16644f4fca157fcdb089b1994a8848c.tar.gz
ipxe-84a2b886e16644f4fca157fcdb089b1994a8848c.tar.xz
ipxe-84a2b886e16644f4fca157fcdb089b1994a8848c.zip
Split error-message table portions of errno.h out to gpxe/errortab.h
-rw-r--r--src/core/errno.c6
-rw-r--r--src/include/errno.h11
-rw-r--r--src/include/gpxe/errortab.h20
-rw-r--r--src/interface/pxe/pxe_errors.c2
4 files changed, 24 insertions, 15 deletions
diff --git a/src/core/errno.c b/src/core/errno.c
index 83c8564bc..84c3424aa 100644
--- a/src/core/errno.c
+++ b/src/core/errno.c
@@ -1,6 +1,6 @@
-#include "etherboot.h"
-#include "errno.h"
-#include "vsprintf.h"
+#include <errno.h>
+#include <console.h>
+#include <gpxe/errortab.h>
/** @file
*
diff --git a/src/include/errno.h b/src/include/errno.h
index 68966bd96..43e207636 100644
--- a/src/include/errno.h
+++ b/src/include/errno.h
@@ -170,17 +170,6 @@
#define ETIMEDOUT 0xf6 /**< Connection timed out */
#define EWOULDBLOCK EAGAIN /**< Resource temporarily unavailable */
-/* Data structures and declarations */
-
-#include <gpxe/tables.h>
-
extern int errno;
-struct errortab {
- int errno;
- const char *text;
-};
-
-#define __errortab __table(errortab,01)
-
#endif /* ERRNO_H */
diff --git a/src/include/gpxe/errortab.h b/src/include/gpxe/errortab.h
new file mode 100644
index 000000000..1ca7fe551
--- /dev/null
+++ b/src/include/gpxe/errortab.h
@@ -0,0 +1,20 @@
+#ifndef _GPXE_ERRORTAB_H
+#define _GPXE_ERRORTAB_H
+
+/** @file
+ *
+ * Error message tables
+ *
+ */
+
+#include <errno.h>
+#include <gpxe/tables.h>
+
+struct errortab {
+ int errno;
+ const char *text;
+};
+
+#define __errortab __table ( errortab, 01 )
+
+#endif /* _GPXE_ERRORTAB_H */
diff --git a/src/interface/pxe/pxe_errors.c b/src/interface/pxe/pxe_errors.c
index dce50d773..3b00127bd 100644
--- a/src/interface/pxe/pxe_errors.c
+++ b/src/interface/pxe/pxe_errors.c
@@ -1,4 +1,4 @@
-#include "errno.h"
+#include <gpxe/errortab.h>
/*
* This table was generated from the relevant section of errno.h using