mirror of https://github.com/xqemu/xqemu.git
block: remove keep_read_only flag from BlockDriverState struct
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>
This commit is contained in:
parent
0bce597d6e
commit
dc1c13d969
2
block.c
2
block.c
|
@ -812,8 +812,6 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int flags,
|
||||||
flags |= BDRV_O_ALLOW_RDWR;
|
flags |= BDRV_O_ALLOW_RDWR;
|
||||||
}
|
}
|
||||||
|
|
||||||
bs->keep_read_only = !(flags & BDRV_O_ALLOW_RDWR);
|
|
||||||
|
|
||||||
/* Open the image */
|
/* Open the image */
|
||||||
ret = bdrv_open_common(bs, filename, flags, drv);
|
ret = bdrv_open_common(bs, filename, flags, drv);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
|
|
@ -275,7 +275,6 @@ struct BlockDriverState {
|
||||||
int64_t total_sectors; /* if we are reading a disk image, give its
|
int64_t total_sectors; /* if we are reading a disk image, give its
|
||||||
size in sectors */
|
size in sectors */
|
||||||
int read_only; /* if true, the media is read only */
|
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 open_flags; /* flags used to open the file, re-used for re-open */
|
||||||
int encrypted; /* if true, the media is encrypted */
|
int encrypted; /* if true, the media is encrypted */
|
||||||
int valid_key; /* if true, a valid encryption key has been set */
|
int valid_key; /* if true, a valid encryption key has been set */
|
||||||
|
|
Loading…
Reference in New Issue