summaryrefslogtreecommitdiffstats
path: root/src/hci/strerror.c
Commit message (Collapse)AuthorAgeFilesLines
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+1
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Rewrite string functionsMichael Brown2015-02-171-1/+1
| | | | | | | | | | | | Some of the C library string functions have an unknown provenance. Reimplement all such functions to avoid potential licensing uncertainty. Remove the inline-assembler versions of strlen(), memswap(), and strncmp(); these save a minimal amount of space (around 40 bytes in total) and are not performance-critical. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Allow error message URI to be customised via config/branding.hMichael Brown2015-02-111-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hci] Use http://ipxe.org/<errno> instead of raw error numbersMichael Brown2010-10-191-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Users tend to gloss over cryptic-looking error messages such as "Boot failed: Exec format error (Error 0x2e852001)" In particular, users tend not to report the error number, which is the single most useful piece of diagnostic information in an iPXE error message. Try replacing the "Error 0x2e852001" portion with a URL, giving "Boot failed: Exec format error (http://ipxe.org/2e852001)" in the hope that users will, upon seeing something that is recognisably a URL, try viewing it in a web browser. Such users will be greeted by a web page containing a more detailed description of the error (automatically generated from the einfo text), including links to each line of code that might generate the error, and a section for additional user-contributed notes. At the time of writing, a user who visits http://ipxe.org/2e852001 would see a note saying "This error usually indicates that the SAN disk is empty, and does not yet contain a bootable operating system." which may be more useful than "Exec format error (Error 0x2e852001)". Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-311-17/+17
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-2/+2
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Use only generic errortab entries to match generic errorsMichael Brown2009-11-161-5/+4Star
|
* [netdevice] Add mechanism for reporting detailed link status codesMichael Brown2009-06-241-0/+1
| | | | | | | | Expand the NETDEV_LINK_UP bit into a link_rc status code field, allowing specific reasons for link failure to be reported via "ifstat". Originally-authored-by: Joshua Oreman <oremanj@rwcr.net>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [segment] Add "Requested memory not available" error messageMichael Brown2009-03-311-0/+1
| | | | | | | | | | | prep_segment() can sometimes fail because an image requests memory that is already in use by gPXE. This will happen if e.g. undionly.kpxe is used to boot memtest86; the memtest86 image is an old-format kernel that needs to be loaded at 9000:0000, but this area of memory may well already be in use by the underlying PXE stack. Add a human-friendly error message, so that the cause is more immediately visible.
* [tables] Redefine methods for accessing linker tablesMichael Brown2009-03-131-7/+1Star
| | | | | | | | | | | | | | | Intel's C compiler (icc) chokes on the zero-length arrays that we currently use as part of the mechanism for accessing linker table entries. Abstract away the zero-length arrays, to make a port to icc easier. Introduce macros such as for_each_table_entry() to simplify the common case of iterating over all entries in a linker table. Represent table names as #defined string constants rather than unquoted literals; this avoids visual confusion between table names and C variable or type names, and also allows us to force a compilation error in the event of incorrect table names.
* [iSCSI] Produce meaningful errors on login failureMichael Brown2008-06-041-7/+10
| | | | | | | | Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or EINVAL depending on the exact error returned by the target, rather than just always returning EPERM. Also, ensure that error strings exist for these errors.
* [HCI] Display "Not an executable image" when appropriateMichael Brown2008-04-081-0/+1
| | | | | | | | | | | | | 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.
* Add per-file error identifiersMichael Brown2007-07-241-9/+6Star
|
* Added EPIPE description.Michael Brown2007-05-261-0/+1
|
* Handle structured error codes.Michael Brown2007-01-191-8/+63
|
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Add ETIMEDOUTMichael Brown2007-01-151-0/+1
|
* Make TCP give up immediately when it receives -ENETUNREACH fromMichael Brown2007-01-141-7/+10
| | | | | | | 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.
* Added ENOENT, since HTTP 404 translates to itMichael Brown2007-01-121-0/+1
|
* Added strerror(0)=="No error", so that TCP protocols can useMichael Brown2007-01-111-0/+1
| | | | | strerror(rc) in their closed() methods without producing "Error 0x0000" when the connection is closed normally.
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-2/+4
| | | | | | | | | | | names. Add "dev" pointer in struct net_device to tie network interfaces back to a hardware device. Force natural alignment of data types in __table() macros. This seems to prevent gcc from taking the unilateral decision to occasionally increase their alignment (which screws up the table packing).
* Print explicit error message on iSCSI boot failure, and addMichael Brown2006-12-211-0/+1
| | | | "Permission denied" as an error text to strerror().
* Add EIO.Michael Brown2006-12-201-5/+4Star
| | | | Kill errortab array; it can screw up alignment.
* Only need printf(), so use vsprintf.h instead of console.hMichael Brown2006-12-201-1/+1
|
* Added messages for some of the most common errorsMichael Brown2006-12-201-0/+11
|
* Split strerror() out from errno.cMichael Brown2006-12-201-0/+49