From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39192 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7cwP-0002h4-4b for qemu-devel@nongnu.org; Wed, 06 Apr 2011 20:19:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7cwO-00078D-56 for qemu-devel@nongnu.org; Wed, 06 Apr 2011 20:19:17 -0400 Received: from humppa.name ([83.246.72.37]:4217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7cwN-00077x-Tj for qemu-devel@nongnu.org; Wed, 06 Apr 2011 20:19:16 -0400 Message-ID: <312edea8efadfde52c4c6d267c924cf2.squirrel@humppa.name> Date: Thu, 7 Apr 2011 00:19:01 -0000 (UTC) From: ralf@humppa.name MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] hw: improve multiboot module loading List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ralf@humppa.name Multiboot modules couldn't be loaded when there are spaces between the filename and ','. Those spaces can simply be killed. Signed-off-by: --- diff --git a/hw/multiboot.c b/hw/multiboot.c index 0d2bfb4..27eb159 100644 --- a/hw/multiboot.c +++ b/hw/multiboot.c @@ -267,6 +267,9 @@ int load_multiboot(void *fw_cfg, /* if a space comes after the module filename, treat everyth= ing after that as parameters */ target_phys_addr_t c =3D mb_add_cmdline(&mbs, initrd_filenam= e); + /* Kill spaces at the beginning of the filename */ + while( *initrd_filename =3D=3D ' ' ) + initrd_filename++; if ((next_space =3D strchr(initrd_filename, ' '))) *next_space =3D '\0'; mb_debug("multiboot loading module: %s\n", initrd_filename);