aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/image/segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/image/segment.c')
-rw-r--r--gpxe/src/image/segment.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gpxe/src/image/segment.c b/gpxe/src/image/segment.c
index 9bd60f9c..e2474536 100644
--- a/gpxe/src/image/segment.c
+++ b/gpxe/src/image/segment.c
@@ -16,6 +16,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+FILE_LICENCE ( GPL2_OR_LATER );
+
/**
* @file
*
@@ -26,6 +28,7 @@
#include <errno.h>
#include <gpxe/uaccess.h>
#include <gpxe/memmap.h>
+#include <gpxe/errortab.h>
#include <gpxe/segment.h>
/**
@@ -72,3 +75,13 @@ int prep_segment ( userptr_t segment, size_t filesz, size_t memsz ) {
start, mid, end );
return -ERANGE;
}
+
+/**
+ * Segment-specific error messages
+ *
+ * This error happens sufficiently often to merit a user-friendly
+ * description.
+ */
+struct errortab segment_errors[] __errortab = {
+ { ERANGE, "Requested memory not available" },
+};