From mboxrd@z Thu Jan 1 00:00:00 1970 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 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 3/3] Disable fall-back to read-only when cannot open drive's file for read-write List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@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); -- 1.6.3.3