Revision dc1c13d9

b/block.c
812 812
        flags |= BDRV_O_ALLOW_RDWR;
813 813
    }
814 814

  
815
    bs->keep_read_only = !(flags & BDRV_O_ALLOW_RDWR);
816

  
817 815
    /* Open the image */
818 816
    ret = bdrv_open_common(bs, filename, flags, drv);
819 817
    if (ret < 0) {
b/block_int.h
275 275
    int64_t total_sectors; /* if we are reading a disk image, give its
276 276
                              size in sectors */
277 277
    int read_only; /* if true, the media is read only */
278
    int keep_read_only; /* if true, the media was requested to stay read only */
279 278
    int open_flags; /* flags used to open the file, re-used for re-open */
280 279
    int encrypted; /* if true, the media is encrypted */
281 280
    int valid_key; /* if true, a valid encryption key has been set */

Also available in: Unified diff