aboutsummaryrefslogtreecommitdiff
path: root/src/hci/strerror.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-04-08 16:28:00 +0100
committerMichael Brown <mcb30@etherboot.org>2008-04-08 16:28:00 +0100
commit3475b693b7fdc7a21902648f01e2dea2b64fec39 (patch)
treeb46eb08b67f2aff2fff29708a005073ade388398 /src/hci/strerror.c
parentfbb6a3fd6558b5a8f2898e1a475d9874dff2c3e2 (diff)
downloadipxe-3475b693b7fdc7a21902648f01e2dea2b64fec39.zip
ipxe-3475b693b7fdc7a21902648f01e2dea2b64fec39.tar.gz
ipxe-3475b693b7fdc7a21902648f01e2dea2b64fec39.tar.bz2
[HCI] Display "Not an executable image" when appropriate
PXE is a catch-all image format with no signature checks. If an unsupported image file is loaded, it will be treated as a PXE image. In most cases, the image will be too large to be loaded as a PXE image (which has to fit in base memory), so the error returned to the user will be that the segment could not fit within the memory region. Add an explicit check to pxe_image.c to reject images larger than base memory with ENOEXEC. Add ENOEXEC to the error string table.
Diffstat (limited to 'src/hci/strerror.c')
-rw-r--r--src/hci/strerror.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/hci/strerror.c b/src/hci/strerror.c
index 4fc15d0..6967590 100644
--- a/src/hci/strerror.c
+++ b/src/hci/strerror.c
@@ -118,4 +118,5 @@ struct errortab common_errors[] __errortab = {
{ ETIMEDOUT, "Connection timed out" },
{ EPIPE, "Broken pipe" },
{ ECANCELED, "Operation cancelled" },
+ { ENOEXEC, "Not an executable image" },
};