From patchwork Thu Apr 7 05:56:45 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: 90134 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 88065B6F72 for ; Thu, 7 Apr 2011 15:58:17 +1000 (EST) Received: from localhost ([127.0.0.1]:48760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q7iEQ-0005rP-Du for incoming@patchwork.ozlabs.org; Thu, 07 Apr 2011 01:58:14 -0400 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 Received: from humppa.name (localhost [127.0.0.1]) by humppa.name (Postfix) with ESMTP id 631162012; Thu, 7 Apr 2011 05:56:39 +0000 (UTC) Received: from 93.135.158.165 (SquirrelMail authenticated user ralf) by humppa.name with HTTP; Thu, 7 Apr 2011 05:56:45 -0000 (UTC) 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" To: "Alexander Graf" 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, qemu-devel@nongnu.org X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ralf@humppa.name 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 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);