]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
block: remove keep_read_only flag from BlockDriverState struct
authorJeff Cody <jcody@redhat.com>
Thu, 20 Sep 2012 19:13:35 +0000 (15:13 -0400)
committerKevin Wolf <kwolf@redhat.com>
Mon, 24 Sep 2012 13:15:13 +0000 (15:15 +0200)
The keep_read_only flag is no longer used, in favor of the bdrv
flag BDRV_O_ALLOW_RDWR.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block_int.h

diff --git a/block.c b/block.c
index 84544d23bbbc52d7357b0cec9db022b932f8b7a5..751ebdc06b119bf43ac3cdd0a986e5b69e637bd1 100644 (file)
--- a/block.c
+++ b/block.c
@@ -812,8 +812,6 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
         flags |= BDRV_O_ALLOW_RDWR;
     }
 
-    bs->keep_read_only = !(flags & BDRV_O_ALLOW_RDWR);
-
     /* Open the image */
     ret = bdrv_open_common(bs, filename, flags, drv);
     if (ret < 0) {
index 22b3d93d19b0de5719c55bd564c59e9b7bdadabe..ac4245cb18fdbe15311ce3714919a0c5a45b06b6 100644 (file)
@@ -275,7 +275,6 @@ struct BlockDriverState {
     int64_t total_sectors; /* if we are reading a disk image, give its
                               size in sectors */
     int read_only; /* if true, the media is read only */
-    int keep_read_only; /* if true, the media was requested to stay read only */
     int open_flags; /* flags used to open the file, re-used for re-open */
     int encrypted; /* if true, the media is encrypted */
     int valid_key; /* if true, a valid encryption key has been set */