diff options
author | Michael Brown | 2007-01-11 17:10:32 +0100 |
---|---|---|
committer | Michael Brown | 2007-01-11 17:10:32 +0100 |
commit | c810baad37673647f6b5683e3f50e7f392c482e2 (patch) | |
tree | 908b7867aa72f10e3356a0fe0ed8003564b29733 /src/tests | |
parent | Rename "image" field to "data", because "image->image" is just confusing. (diff) | |
download | ipxe-c810baad37673647f6b5683e3f50e7f392c482e2.tar.gz ipxe-c810baad37673647f6b5683e3f50e7f392c482e2.tar.xz ipxe-c810baad37673647f6b5683e3f50e7f392c482e2.zip |
Use generic "struct image" rather than "struct elf".
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/tftptest.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tests/tftptest.c b/src/tests/tftptest.c index 57f51502..7bdec78d 100644 --- a/src/tests/tftptest.c +++ b/src/tests/tftptest.c @@ -6,6 +6,7 @@ #include <gpxe/async.h> #include <gpxe/uaccess.h> #include <gpxe/buffer.h> +#include <gpxe/image.h> #include <gpxe/elf.h> #include <bios.h> #include "pxe.h" @@ -14,7 +15,7 @@ int test_tftp ( struct net_device *netdev, struct sockaddr_tcpip *target, const char *filename ) { struct tftp_session tftp; struct buffer buffer; - struct elf elf; + struct image image; uint16_t fbms; int rc; @@ -32,11 +33,11 @@ int test_tftp ( struct net_device *netdev, struct sockaddr_tcpip *target, if ( ( rc = async_wait ( tftp_get ( &tftp ) ) ) != 0 ) return rc; - elf.image = buffer.addr; - elf.len = buffer.len; - if ( ( rc = elf_load ( &elf ) ) == 0 ) { + image.data = buffer.addr; + image.len = buffer.len; + if ( ( rc = elf_load ( &image ) ) == 0 ) { printf ( "Got valid ELF image: execaddr at %lx\n", - elf.entry ); + image.entry ); return 0; } |