david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

27 Commits

Author SHA1 Message Date
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown 8ee39f7432 [libc] Rewrite string functions
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>
2015-02-16 23:16:20 +00:00
Michael Brown eac445b650 [build] Allow error message URI to be customised via config/branding.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-11 14:11:28 +00:00
Michael Brown 4995ffa438 [hci] Use http://ipxe.org/<errno> instead of raw error numbers
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>
2010-10-19 06:14:22 +01:00
Michael Brown 6c0e8c14be [libc] Enable automated extraction of error usage reports
Add preprocessor magic to the error definitions to enable every error
usage to be tracked.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-31 03:11:57 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
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>
2010-04-19 23:43:39 +01:00
Michael Brown 76d5e493d1 [libc] Use only generic errortab entries to match generic errors 2009-11-16 22:08:59 +00:00
Michael Brown a310d00d37 [netdevice] Add mechanism for reporting detailed link status codes
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>
2009-06-24 13:04:36 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown f7d2168c8e [segment] Add "Requested memory not available" error message
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.
2009-03-31 04:38:48 +01:00
Michael Brown 1266d7902b [tables] Redefine methods for accessing linker tables
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.
2009-03-13 02:06:30 +00:00
Michael Brown 75965c9c6e [iSCSI] Produce meaningful errors on login failure
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.
2008-06-03 23:47:20 +01:00
Michael Brown 3475b693b7 [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.
2008-04-08 16:28:00 +01:00
Michael Brown 9aa61ad5a2 Add per-file error identifiers 2007-07-24 17:11:31 +01:00
Michael Brown 070c55a838 Added EPIPE description. 2007-05-26 15:05:31 +00:00
Michael Brown cde6d776e3 Handle structured error codes. 2007-01-19 13:52:50 +00:00
Michael Brown 73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown 90d859c34b Add ETIMEDOUT 2007-01-15 02:46:56 +00:00
Michael Brown 76aa9ad07d 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.
2007-01-14 16:47:03 +00:00
Michael Brown 63386f4455 Added ENOENT, since HTTP 404 translates to it 2007-01-12 19:14:01 +00:00
Michael Brown 83fa318b86 Added strerror(0)=="No error", so that TCP protocols can use
strerror(rc) in their closed() methods without producing "Error
0x0000" when the connection is closed normally.
2007-01-11 04:01:31 +00:00
Michael Brown dad5274522 Add "name" field to struct device to allow human-readable hardware device
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).
2007-01-10 04:22:09 +00:00
Michael Brown 286db6ffa3 Print explicit error message on iSCSI boot failure, and add
"Permission denied" as an error text to strerror().
2006-12-21 16:16:24 +00:00
Michael Brown 07ddaedd33 Add EIO.
Kill errortab array; it can screw up alignment.
2006-12-20 07:57:40 +00:00
Michael Brown 75430e813e Only need printf(), so use vsprintf.h instead of console.h 2006-12-20 05:33:12 +00:00
Michael Brown fc7dcc201b Added messages for some of the most common errors 2006-12-20 03:54:20 +00:00
Michael Brown 7766e34ed1 Split strerror() out from errno.c 2006-12-20 03:49:36 +00:00