[ipxe-devel] [PATCH] fix up command-line support

Michael Brown mbrown at fensystems.co.uk
Mon Jun 27 23:36:44 UTC 2011


Dave Hansen <dave at sr71.net> wrote:
>For me, this code just ends up NULL'ing out the first byte of the
>command-line, effectively erasing it since strstr() returns the
>beginning
>of the matched string:
>
>	if ( ( tmp = strstr ( cmdline, "BOOT_IMAGE=" ) ) != NULL )
>		*tmp = '\0';
>
>I'm not quite sure what this code was trying to do, but I assume it was
>trying to move 'cmdline' or 'tmp' past the "BOOT_IMAGE=" string.

In my testing, BOOT_IMAGE= appeared at the end of the command line. It sounds as though it's being added at the start of yours.  Given this, the sensible option is probably to strip out everything between BOOT_IMAGE= and its terminating whitespace/NUL.

Michael





More information about the ipxe-devel mailing list