qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v7 11/13] block/curl.c: Refuse to open the handle fo


From: Fam Zheng
Subject: [Qemu-devel] [PATCH v7 11/13] block/curl.c: Refuse to open the handle for writes.
Date: Thu, 6 Jun 2013 14:25:57 +0800

From: "Richard W.M. Jones" <address@hidden>

Signed-off-by: Richard W.M. Jones <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
---
 block/curl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/curl.c b/block/curl.c
index e067417..bce2e8a 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.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]