Received: from [140.186.70.92] (port=50322 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7iDA-0005p3-Se for qemu-devel@nongnu.org; Thu, 07 Apr 2011 01:56:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q7iD9-0000u8-VN for qemu-devel@nongnu.org; Thu, 07 Apr 2011 01:56:56 -0400 Received: from humppa.name ([83.246.72.37]:2758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q7iD9-0000tl-Oi for qemu-devel@nongnu.org; Thu, 07 Apr 2011 01:56:55 -0400 Message-ID: <7f0b8ad36b8e8d1828f0dfc1803c0da0.squirrel@humppa.name> In-Reply-To: <03A8D429-04D0-42D9-A664-7C52B3A4F812@suse.de> References: <312edea8efadfde52c4c6d267c924cf2.squirrel@humppa.name> <03A8D429-04D0-42D9-A664-7C52B3A4F812@suse.de> Date: Thu, 7 Apr 2011 05:56:45 -0000 (UTC) Subject: Re: [Qemu-devel] [PATCH] hw: improve multiboot module loading From: "Ralf Ramsauer" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Reply-To: ralf@humppa.name List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: ralf@humppa.name, qemu-devel@nongnu.org Here the version with the correct coding style. diff --git a/hw/multiboot.c b/hw/multiboot.c index 0d2bfb4..2380d5e 100644 --- a/hw/multiboot.c +++ b/hw/multiboot.c @@ -267,6 +267,11 @@ 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);