From patchwork Thu Apr 7 05:56:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: hw: improve multiboot module loading From: ralf@humppa.name X-Patchwork-Id: 90134 Message-Id: <7f0b8ad36b8e8d1828f0dfc1803c0da0.squirrel@humppa.name> To: "Alexander Graf" Cc: ralf@humppa.name, qemu-devel@nongnu.org Date: Thu, 7 Apr 2011 05:56:45 -0000 (UTC) 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 everything after that as parameters */ target_phys_addr_t c = mb_add_cmdline(&mbs, initrd_filename); + /* Kill spaces at the beginning of the filename */ + while (*initrd_filename == ' ') + { + initrd_filename++; + } if ((next_space = strchr(initrd_filename, ' '))) *next_space = '\0'; mb_debug("multiboot loading module: %s\n", initrd_filename);