summaryrefslogtreecommitdiffstats
path: root/src/core/misc.c
Commit message (Collapse)AuthorAgeFilesLines
* [ipv4] Rewrite inet_aton()Michael Brown2015-02-191-23/+0Star
| | | | | | | | | | 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>
* [base16] Generalise base16_decode() to hex_decode()Michael Brown2013-07-121-0/+13
| | | | | | | 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>
* [libc] Allow strtoul() to interpret negative numbersMichael Brown2012-04-171-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add strtoull()Piotr Jaroszyński2010-08-191-22/+2Star
| | | | | | | | | | 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>
* [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>
* [script] Allow for DOS-style line endings in scriptsMichael Brown2009-06-031-14/+1Star
| | | | | | | | | | | | | | | 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>
* [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.
* [libc] Fix a validation bug in strtoul()Michael Brown2008-03-181-1/+1
| | | | | strtoul() was accepting the characters immediately above ASCII 0..9 as valid hex digits, due to a missing comparison.
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-1/+1
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Introduce the new timer subsystem.Alexey Zaytsev2008-03-021-12/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Dead code removal.Michael Brown2007-07-141-70/+3Star
| | | | Kill off use of etherboot.h outside drivers/net.
* Warnings purge of src/coreMarty Connor2007-07-021-2/+3
|
* Split random number generation out into core/random.c, and create theMichael Brown2007-01-191-18/+0Star
| | | | correct prototypes for srandom(), rand() and srand().
* Make shutdown functions callable by OS image's exec methods.Michael Brown2007-01-141-26/+0Star
|
* Added isspace() and made strtoul() accept whitespace, as per POSIX.Michael Brown2007-01-121-0/+17
|
* Fix prototype of random() and move to stdlib.hMichael Brown2006-12-221-1/+2
|
* Fix prototype of sleep() and move it to unistd.hMichael Brown2006-12-201-2/+3
|
* Note to self: do not write code late at nightMichael Brown2006-11-151-5/+8
|
* May as well add octal support to strtoul()Michael Brown2006-11-151-5/+8
|
* Fixed endp bug in strtoul()Michael Brown2006-11-151-1/+2
|
* Extend strtoul() to cope with hex as well as decimal. Doesn't copeMichael Brown2006-11-151-9/+25
| | | | with octal yet, but we can probably live without that.
* Kill off poll_interruptions(); it is lethal when we're acting as a PXEMichael Brown2006-08-151-15/+0Star
| | | | stack or INT 13 emulator etc.
* Remove dependency on arptable[] (which is no longer used).Michael Brown2006-06-161-2/+1Star
|
* Split debug functions out into core/debug.c, so that they can beMichael Brown2006-05-171-91/+2Star
| | | | | | | | 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.
* Fix up prototype of strtoul() to match POSIX.Michael Brown2006-04-301-1/+1
|
* inet_aton doesn't overwrite the IP address unless it is valid.Michael Brown2005-04-301-5/+7
|
* Merged mcb30-realmode-redesign back to HEADMichael Brown2005-04-081-142/+1Star
|
* Initial revisionMichael Brown2005-03-081-0/+415