Cleaner separation between imgXXX() functions and image_cmd.c

This commit is contained in:
Michael Brown
2007-01-12 07:22:20 +00:00
parent 742f242863
commit f135a37f30
4 changed files with 395 additions and 66 deletions
-7
View File
@@ -23,7 +23,6 @@
*
*/
#include <libgen.h>
#include <vsprintf.h>
#include <gpxe/emalloc.h>
#include <gpxe/ebuffer.h>
@@ -45,12 +44,6 @@ int fetch ( struct image *image, const char *filename ) {
struct buffer buffer;
int rc;
/* Name the image, if it isn't explicitly named */
if ( ! image->name[0] ) {
strncpy ( image->name, basename ( filename ),
( sizeof ( image->name ) - 1 ) );
}
/* Allocate an expandable buffer to hold the file */
if ( ( rc = ebuffer_alloc ( &buffer, 0 ) ) != 0 )
return rc;