Re: [Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev

2014-11-26 Thread Eric Blake
On 11/20/2014 05:44 AM, Max Reitz wrote: Add an option to qmp_change_blockdev() which allows changing the read-only status of the block device to be changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently

Re: [Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev

2014-11-26 Thread Max Reitz
On 2014-11-26 at 17:24, Eric Blake wrote: On 11/20/2014 05:44 AM, Max Reitz wrote: Add an option to qmp_change_blockdev() which allows changing the read-only status of the block device to be changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be

Re: [Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev

2014-11-26 Thread Eric Blake
On 11/26/2014 09:36 AM, Max Reitz wrote: -qmp_bdrv_open_encrypted(bs, filename, bdrv_flags, drv, NULL, errp); +qmp_bdrv_open_encrypted(bs, filename, bdrv_flags, drv, NULL, err); + +if (err) { +if (read_only == BLOCKDEV_CHANGE_READ_ONLY_MODE_AUTO) { +

[Qemu-devel] [PATCH 1/3] blockdev: Add read-only option to change-blockdev

2014-11-20 Thread Max Reitz
Add an option to qmp_change_blockdev() which allows changing the read-only status of the block device to be changed. Some drives do not have a inherently fixed read-only status; for instance, floppy disks can be set read-only or writable independently of the drive. Some users may find it useful