Browse Source

[comboot] Do not assume that image has a non-NULL command line

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 14 years ago
parent
commit
d1ad046a87
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/arch/i386/image/com32.c

+ 3
- 3
src/arch/i386/image/com32.c View File

119
 			/* %2 */ "r" ( get_fbms() * 1024 - (COM32_BOUNCE_SEG << 4) ),
119
 			/* %2 */ "r" ( get_fbms() * 1024 - (COM32_BOUNCE_SEG << 4) ),
120
 			/* %3 */ "i" ( COM32_BOUNCE_SEG << 4 ),
120
 			/* %3 */ "i" ( COM32_BOUNCE_SEG << 4 ),
121
 			/* %4 */ "r" ( virt_to_phys ( com32_intcall_wrapper ) ),
121
 			/* %4 */ "r" ( virt_to_phys ( com32_intcall_wrapper ) ),
122
-			/* %5 */ "r" ( virt_to_phys ( image->cmdline ) ),
122
+			/* %5 */ "r" ( virt_to_phys ( image->cmdline ?
123
+						      image->cmdline : "" ) ),
123
 			/* %6 */ "r" ( COM32_START_PHYS )
124
 			/* %6 */ "r" ( COM32_START_PHYS )
124
 		:
125
 		:
125
 			"memory" );
126
 			"memory" );
291
 static int com32_probe ( struct image *image ) {
292
 static int com32_probe ( struct image *image ) {
292
 	int rc;
293
 	int rc;
293
 
294
 
294
-	DBGC ( image, "COM32 %p: name '%s', cmdline '%s'\n",
295
-	       image, image->name, image->cmdline );
295
+	DBGC ( image, "COM32 %p: name '%s'\n", image, image->name );
296
 
296
 
297
 	/* Check if this is a COMBOOT image */
297
 	/* Check if this is a COMBOOT image */
298
 	if ( ( rc = com32_identify ( image ) ) != 0 ) {
298
 	if ( ( rc = com32_identify ( image ) ) != 0 ) {

Loading…
Cancel
Save