From patchwork Thu Apr 7 00:19:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ralf@humppa.name X-Patchwork-Id: 90116 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CDC22B6EF7 for ; Thu, 7 Apr 2011 10:19:59 +1000 (EST) Received: from localhost ([127.0.0.1]:34513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7cx0-0002hJ-SJ for incoming@patchwork.ozlabs.org; Wed, 06 Apr 2011 20:19:54 -0400 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 Received: from humppa.name (localhost [127.0.0.1]) by humppa.name (Postfix) with ESMTP id AF2042012; Thu, 7 Apr 2011 00:19:01 +0000 (UTC) Received: from 93.135.158.165 (SquirrelMail authenticated user ralf) by humppa.name with HTTP; Thu, 7 Apr 2011 00:19:01 -0000 (UTC) Message-ID: <312edea8efadfde52c4c6d267c924cf2.squirrel@humppa.name> Date: Thu, 7 Apr 2011 00:19:01 -0000 (UTC) From: ralf@humppa.name To: qemu-devel@nongnu.org User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 2) X-Received-From: 83.246.72.37 Cc: ralf@humppa.name Subject: [Qemu-devel] [PATCH] hw: improve multiboot module loading X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 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);