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

28 Commits

Author SHA1 Message Date
Michael Brown bb1abb2b21 [ipv4] Rewrite inet_aton()
The implementation of inet_aton() has an unknown provenance.  Rewrite
this code to avoid potential licensing uncertainty.

Also move the code from core/misc.c to its logical home in net/ipv4.c,
and add a few extra test cases.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-02-19 14:02:07 +00:00
Michael Brown 076f58c4bf [base16] Generalise base16_decode() to hex_decode()
Provide a generic hex_decode() routine which can be shared between the
Base16 code and the "hex" and "hexhyp" settings parsers.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-07-12 15:14:36 +02:00
Michael Brown 1d33649516 [libc] Allow strtoul() to interpret negative numbers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-04-17 10:42:08 +01:00
Piotr Jaroszyński 1822b1deb9 [libc] Add strtoull()
Don't implement strtoul() on top of strtoull() as strtoull() is much
bigger and only used on linux currently. Instead refactor most of the
logic out of strtoul() into static inlines and reuse that. Also put it
in a separate object so it won't get linked in.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-08-19 12:22:07 +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 4c5f00f879 [script] Allow for DOS-style line endings in scripts
Windows text editors such as Notepad tend to use CRLF line endings,
which breaks gPXE's signature detection for script images.  Since
scripts are usually very small, they end up falling back to being
detected as valid PXE executable images (since there are no signature
checks for PXE executables).  Executing text files as x86 machine code
tends not to work well.

Fix by allowing for any isspace() character to terminate the "#!gpxe"
signature, and by ensuring that CR characters get stripped during
command line parsing.

Suggested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
2009-06-03 10:13:29 +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 6fe585642a [libc] Fix a validation bug in strtoul()
strtoul() was accepting the characters immediately above ASCII 0..9 as
valid hex digits, due to a missing comparison.
2008-03-18 03:14:05 +00:00
Alexey Zaytsev a1572e0ab0 Modify gPXE core and drivers to work with the new timer subsystem
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-03-02 03:41:10 +03:00
Alexey Zaytsev 4006d229e5 Introduce the new timer subsystem.
Timer subsystem initialization code in core/timer.c

	Split the BIOS and RTDSC timer drivers from i386_timer.c

	Split arch/i386/firmware/pcbios/bios.c into the RTSDC
	timer driver and arch/i386/core/nap.c

	Split the headers properly:
		include/unistd.h - delay functions to be used by the
					gPXE core and drivers.

		include/gpxe/timer.h - the fimer subsystem interface
					to be used by the timer drivers
					and currticks() to be used by
					the code gPXE subsystems.

		include/latch.h	- removed
		include/timer.h - scheduled for removal. Some driver
					are using currticks, which is
					only for core subsystems.

Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2008-03-02 03:15:07 +03:00
Michael Brown e330db3c74 Dead code removal.
Kill off use of etherboot.h outside drivers/net.
2007-07-14 15:42:26 +01:00
Marty Connor bf871c4d03 Warnings purge of src/core 2007-07-02 15:26:40 -04:00
Michael Brown 4256b3338a Split random number generation out into core/random.c, and create the
correct prototypes for srandom(), rand() and srand().
2007-01-19 02:02:59 +00:00
Michael Brown c2708df14a Make shutdown functions callable by OS image's exec methods. 2007-01-14 00:16:41 +00:00
Michael Brown ca3db0bf11 Added isspace() and made strtoul() accept whitespace, as per POSIX. 2007-01-12 19:11:28 +00:00
Michael Brown 73e3e02367 Fix prototype of random() and move to stdlib.h 2006-12-22 01:44:51 +00:00
Michael Brown 637a891264 Fix prototype of sleep() and move it to unistd.h 2006-12-20 03:14:59 +00:00
Michael Brown ea97fe42dd Note to self: do not write code late at night 2006-11-15 04:16:26 +00:00
Michael Brown 5753f2c58b May as well add octal support to strtoul() 2006-11-15 02:57:24 +00:00
Michael Brown bbfb2e02fd Fixed endp bug in strtoul() 2006-11-15 02:54:28 +00:00
Michael Brown 65ff5357f1 Extend strtoul() to cope with hex as well as decimal. Doesn't cope
with octal yet, but we can probably live without that.
2006-11-15 02:52:06 +00:00
Michael Brown 97439cb6eb Kill off poll_interruptions(); it is lethal when we're acting as a PXE
stack or INT 13 emulator etc.
2006-08-14 22:29:51 +00:00
Michael Brown 8aeead7c1c Remove dependency on arptable[] (which is no longer used). 2006-06-16 14:48:31 +00:00
Michael Brown a4143e8c87 Split debug functions out into core/debug.c, so that they can be
automatically linked in on demand.

Corrected warnings in misc.c.  strtoul() really should be
  unsigned long strtoul ( const char *p, const char **endp, int base )
but such is not the ANSI standard.
2006-05-17 17:16:24 +00:00
Michael Brown 8df7e74990 Fix up prototype of strtoul() to match POSIX. 2006-04-30 11:45:38 +00:00
Michael Brown 903ddd9878 inet_aton doesn't overwrite the IP address unless it is valid. 2005-04-30 13:50:34 +00:00
Michael Brown 0ff80b477d Merged mcb30-realmode-redesign back to HEAD 2005-04-08 15:01:17 +00:00
Michael Brown 3d6123e69a Initial revision 2005-03-08 18:53:11 +00:00