From patchwork Thu Jan 14 14:33:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naphtali Sprei X-Patchwork-Id: 42893 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 86159B7CD7 for ; Fri, 15 Jan 2010 01:49:54 +1100 (EST) Received: from localhost ([127.0.0.1]:55055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVQuD-0007YX-VB for incoming@patchwork.ozlabs.org; Thu, 14 Jan 2010 09:42:37 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVQlT-0004TG-5u for qemu-devel@nongnu.org; Thu, 14 Jan 2010 09:33:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVQlO-0004RL-3e for qemu-devel@nongnu.org; Thu, 14 Jan 2010 09:33:34 -0500 Received: from [199.232.76.173] (port=51316 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVQlN-0004RI-Tm for qemu-devel@nongnu.org; Thu, 14 Jan 2010 09:33:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58806) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NVQlN-0006zx-GC for qemu-devel@nongnu.org; Thu, 14 Jan 2010 09:33:29 -0500 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 o0EEXStf023017 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 14 Jan 2010 09:33:28 -0500 Received: from [10.35.0.60] (dhcp-0-60.tlv.redhat.com [10.35.0.60]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0EEXQSY011084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 14 Jan 2010 09:33:28 -0500 Message-ID: <4B4F2B36.8090501@redhat.com> Date: Thu, 14 Jan 2010 16:33:26 +0200 From: Naphtali Sprei User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: qemu-devel@nongnu.org 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. Subject: [Qemu-devel] [PATCH 3/3] Disable fall-back to read-only when cannot open drive's file for read-write 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 Signed-off-by: Naphtali Sprei --- block.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index cbd72cc..0b4b9ad 100644 --- a/block.c +++ b/block.c @@ -457,10 +457,6 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags, ret = -ENOTSUP; } else { ret = drv->bdrv_open(bs, filename, open_flags); - if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) { - ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR); - bs->read_only = 1; - } } if (ret < 0) { qemu_free(bs->opaque);