summaryrefslogtreecommitdiffstats
path: root/src/core/main.c
diff options
context:
space:
mode:
authorMichael Brown2005-05-09 16:27:29 +0200
committerMichael Brown2005-05-09 16:27:29 +0200
commit0fe74493f48c25bb92373e68bf6856eda7ac5667 (patch)
treedc52d59e0531c6d2526013fde650581386f60eb6 /src/core/main.c
parentoff_t should be signed. (diff)
downloadipxe-0fe74493f48c25bb92373e68bf6856eda7ac5667.tar.gz
ipxe-0fe74493f48c25bb92373e68bf6856eda7ac5667.tar.xz
ipxe-0fe74493f48c25bb92373e68bf6856eda7ac5667.zip
Protocols now load data into a buffer; they don't execute it.
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 08f6d6a5..260a44b8 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -162,6 +162,7 @@ void initialise ( void ) {
MAIN - Kick off routine
**************************************************************************/
int main ( void ) {
+ struct buffer buffer;
int skip = 0;
/* Print out configuration */
@@ -213,8 +214,15 @@ int main ( void ) {
continue;
}
- /* Boot from the device */
- load ( &dev, load_block );
+ /* Load boot file from the device */
+ init_buffer ( &buffer, 0x7c00, 0x100 );
+ if ( ! load ( &dev, &buffer ) ) {
+ /* Load (e.g. TFTP failed) */
+ printf ( "...load failed\n" );
+ continue;
+ }
+
+ printf ( "Loaded file of size %d\n", buffer.fill );
}