summaryrefslogtreecommitdiffstats
path: root/src/core/image.c
Commit message (Collapse)AuthorAgeFilesLines
* [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.
* [comboot] Fix reference counting on replacement imagesMichael Brown2009-02-171-2/+1Star
| | | | When chaining COMBOOT images, the old images now get freed correctly.
* [comboot] Allow for tail recursion of COMBOOT imagesMichael Brown2009-02-171-3/+27
| | | | | | | | | | | | Multi-level menus via COMBOOT rely on the COMBOOT program being able to exit and invoke a new COMBOOT program (the next menu). This works, but rapidly (within about five iterations) runs out of space in gPXE's internal stack, since each new image is executed in a new function context. Fix by allowing tail recursion between images; an image can now specify a replacement image for itself, and image_exec() will perform the necessary tail recursion.
* [image] Revert "clear LOADED flag" patchMichael Brown2008-07-081-10/+1Star
| | | | | | | | | Clearing the LOADED flag actually prevents users from doing clever things such as loading an image, then loading a patch image, then executing the first image. (image_exec() checks for IMAGE_LOADED, so this sequence of operations will fail if the LOADED flag gets cleared.) This reverts commit 14c080020fb37cb34fe74213393f47bd2ad8b9bc.
* [image] Clear LOADED flag on all other images when loading a new imageMichael Brown2008-07-081-1/+10
| | | | | | Loading an image may overwrite part or all of any previously-loaded images, so we should clear the LOADED flag for all images prior to attempting to load a new image.
* Set current working URI to be that of the executable image whenMichael Brown2007-08-071-3/+12
| | | | | executing any image, not just a script. (This will enable pxelinux to use relative URIs, should it wish to.)
* Allow images to hold references to the originating URI.Michael Brown2007-08-021-0/+78
| | | | Some shuffling around of the image management code; this needs tidying up.
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* Scripts temporarily deregister themselves while executing. ThisMichael Brown2007-06-091-14/+0Star
| | | | | allows us to avoid execution loops without having to hack around the image registration order.
* Add reference counting to register/unregister procedure.Michael Brown2007-06-091-0/+32
|
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Rename e{malloc,realloc,free} to u{malloc,realloc,free}, to more obviouslyMichael Brown2007-01-161-1/+0Star
| | | | | reflect the fact that they allocate and deallocate user memory (i.e. things reached through a userptr_t).
* Once image type has been set, do not autoprobe furtherMichael Brown2007-01-141-0/+5
|
* Allow load() and exec() methods to be NULL.Michael Brown2007-01-141-0/+9
|
* Print image physical location in registration message.Michael Brown2007-01-121-1/+3
|
* Let ifmgmt.c take care of calling efree(), since it's the once whichMichael Brown2007-01-121-26/+33
| | | | | | | took out the contract to eventually call efree() when it called fetch(). Maintain the most recently loaded image at the start of the list, so that imgautoselect() will pick it.
* Add debug messageMichael Brown2007-01-121-0/+1
|
* fetch() now knows nothing about struct image; it simply loads a file andMichael Brown2007-01-121-3/+1Star
| | | | returns the allocated buffer.
* Add free_imageMichael Brown2007-01-121-0/+17
|
* Added IMAGE_LOADED flag and find_image()Michael Brown2007-01-121-0/+27
|
* Allow for named images.Michael Brown2007-01-121-3/+5
|
* Provide registration mechanism for loaded images, so that we can e.g.Michael Brown2007-01-121-62/+115
| | | | | | | | refer to them by name from the command line, or build them into a multiboot module list. Use setting image->type to disambiguate between "not my image" and "bad image"; this avoids relying on specific values of the error code.
* Move include/image.h to include/gpxe/image.hMichael Brown2007-01-111-3/+2Star
|
* Update buffer-handling code to enable expandable buffers.Michael Brown2007-01-111-1/+0Star
|
* Move include/buffer.h to include/gpxe/buffer.hMichael Brown2007-01-111-1/+1
|
* fix printf format argsMarty Connor2006-06-291-0/+1
|
* Tear out old heap code, replace with code that simply allocates memoryMichael Brown2006-05-161-0/+4
| | | | | | | | | for use by malloc(). This breaks the image-loading code (which previously used the heap to allocate the buffer for downloading the image), but that's not a major concern since I'm going to tear out all the image formats within the next couple of days anyway. Byebye, NBI! :)
* Added print_images() and autoload().Michael Brown2005-05-171-24/+57
|
* First versionsMichael Brown2005-05-091-0/+49