From patchwork Wed Oct 7 11:37:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 35263 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 E88A8B7BA2 for ; Wed, 7 Oct 2009 22:39:56 +1100 (EST) Received: from localhost ([127.0.0.1]:42791 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUs4-0005u5-RR for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2009 07:39:52 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvUpd-000419-MC for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:37:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvUpY-0003rx-Kz for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:37:20 -0400 Received: from [199.232.76.173] (port=45911 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvUpY-0003rS-7H for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:37:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48352) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvUpX-0002cz-RB for qemu-devel@nongnu.org; Wed, 07 Oct 2009 07:37:16 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97BbFr7010282 for ; Wed, 7 Oct 2009 07:37:15 -0400 Received: from zweiblum.home.kraxel.org (vpn1-4-182.sin2.redhat.com [10.67.4.182]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n97BbAlD019633; Wed, 7 Oct 2009 07:37:12 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id F07E0700E5; Wed, 7 Oct 2009 13:37:07 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 7 Oct 2009 13:37:07 +0200 Message-Id: <1254915427-7375-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1254915427-7375-1-git-send-email-kraxel@redhat.com> References: <1254915427-7375-1-git-send-email-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [PATCH 2/2] rom loader: also try filename as-is. 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 In case qemu_find_file fails try to open the file as-is. Signed-off-by: Gerd Hoffmann --- hw/loader.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/loader.c b/hw/loader.c index 40112b9..4ce7c6a 100644 --- a/hw/loader.c +++ b/hw/loader.c @@ -559,8 +559,7 @@ int rom_add_file(const char *file, rom->name = qemu_strdup(file); rom->path = qemu_find_file(QEMU_FILE_TYPE_BIOS, rom->name); if (rom->path == NULL) { - fprintf(stderr, "Could not find option rom '%s'\n", rom->name); - goto err; + rom->path = strdup(file); } fd = open(rom->path, O_RDONLY);