diff options
author | Michael Brown <mcb30@etherboot.org> | 2007-01-12 05:26:19 +0000 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2007-01-12 05:26:19 +0000 |
commit | 9debfed07a4231db4a499ad81e1c64aca3b20747 (patch) | |
tree | 49c625c0fe527acfa5d9485cc488032a2c4f999b /src/arch/i386/image/multiboot.c | |
parent | f15482d85f905381cb71d5161fbecc33021a34ed (diff) | |
download | ipxe-9debfed07a4231db4a499ad81e1c64aca3b20747.tar.gz |
Place command-line inline, to save on memory allocation hassles.
Diffstat (limited to 'src/arch/i386/image/multiboot.c')
-rw-r--r-- | src/arch/i386/image/multiboot.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/arch/i386/image/multiboot.c b/src/arch/i386/image/multiboot.c index f27f22807..cdf81e6eb 100644 --- a/src/arch/i386/image/multiboot.c +++ b/src/arch/i386/image/multiboot.c @@ -119,8 +119,7 @@ multiboot_build_module_list ( struct image *image, module->mod_start = user_to_phys ( module_image->data, 0 ); module->mod_end = user_to_phys ( module_image->data, module_image->len ); - if ( image->cmdline ) - module->string = virt_to_phys ( image->cmdline ); + module->string = virt_to_phys ( image->cmdline ); /* We promise to page-align modules, so at least check */ assert ( ( module->mod_start & 0xfff ) == 0 ); @@ -154,11 +153,9 @@ static int multiboot_exec ( struct image *image ) { mbinfo.mmap_addr = virt_to_phys ( &mbmemmap[0].base_addr ); mbinfo.flags |= ( MBI_FLAG_MEM | MBI_FLAG_MMAP ); - /* Set command line, if present */ - if ( image->cmdline ) { - mbinfo.cmdline = virt_to_phys ( image->cmdline ); - mbinfo.flags |= MBI_FLAG_CMDLINE; - } + /* Set command line */ + mbinfo.cmdline = virt_to_phys ( image->cmdline ); + mbinfo.flags |= MBI_FLAG_CMDLINE; /* Construct module list */ num_modules = multiboot_build_module_list ( image, NULL ); |