mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-29 21:12:07 -06:00
read-only: Another minor cleanup
Don't rely on CDROM hint for read_only attribute Signed-off-by: Naphtali Sprei <nsprei@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
07108b29c5
commit
0056dcc114
1 changed files with 1 additions and 2 deletions
|
@ -613,8 +613,7 @@ static int scsi_disk_emulate_mode_sense(SCSIRequest *req, uint8_t *outbuf)
|
||||||
|
|
||||||
p[1] = 0; /* Default media type. */
|
p[1] = 0; /* Default media type. */
|
||||||
p[3] = 0; /* Block descriptor length. */
|
p[3] = 0; /* Block descriptor length. */
|
||||||
if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM ||
|
if (bdrv_is_read_only(s->bs)) {
|
||||||
bdrv_is_read_only(s->bs)) {
|
|
||||||
p[2] = 0x80; /* Readonly. */
|
p[2] = 0x80; /* Readonly. */
|
||||||
}
|
}
|
||||||
p += 4;
|
p += 4;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue