From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfMNC-000705-Lg for qemu-devel@nongnu.org; Wed, 22 May 2013 23:39:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfMN6-0004K9-Fs for qemu-devel@nongnu.org; Wed, 22 May 2013 23:39:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfMN6-0004K3-8u for qemu-devel@nongnu.org; Wed, 22 May 2013 23:39:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4N3dJ62021998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 22 May 2013 23:39:19 -0400 From: Fam Zheng Date: Thu, 23 May 2013 11:38:09 +0800 Message-Id: <1369280289-20928-12-git-send-email-famz@redhat.com> In-Reply-To: <1369280289-20928-1-git-send-email-famz@redhat.com> References: <1369280289-20928-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v5 11/11] block/curl.c: Refuse to open the handle for writes. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, jcody@redhat.com, Fam Zheng , "Richard W.M. Jones" , stefanha@redhat.com From: "Richard W.M. Jones" Signed-off-by: Richard W.M. Jones Signed-off-by: Fam Zheng --- block/curl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/curl.c b/block/curl.c index b6cc5a0..4499445 100644 --- a/block/curl.c +++ b/block/curl.c @@ -454,6 +454,10 @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags) static int inited = 0; + if (flags & BDRV_O_RDWR) { + return -ENOTSUP; + } + opts = qemu_opts_create_nofail(&runtime_opts); qemu_opts_absorb_qdict(opts, options, &local_err); if (error_is_set(&local_err)) { -- 1.8.2.3