Skip to contentSkip to conversation

block/curl.c: Refuse to open the handle for writes.

PATCH In review Richard W.M. Jones 2 participants 2 messages May 22, 2013 – May 23, 2013 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/curl.c: Refuse to open the handle for writes.

From: "Richard W.M. Jones" <[email protected]>

---
 block/curl.c | 4 ++++
 1 file changed, 4 insertions(+)
block/curl.c +4 -0
index b8935fd..f1e302b 100644
@@ -406,6 +406,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)) {
Signature · 1 line
1.8.2.1
#1 lore raw
Quoted 24 lines · Richard W.M. Jones

From: "Richard W.M. Jones" <[email protected]>

---
 block/curl.c | 4 ++++
 1 file changed, 4 insertions(+)
block/curl.c +4 -0
index b8935fd..f1e302b 100644
@@ -406,6 +406,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)) {
Signature · 1 line
1.8.2.1

Thanks, I'll include this in the new version of my series.

Signature · 1 line
Fam