mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 04:30:02 +00: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
@ -613,8 +613,7 @@ static int scsi_disk_emulate_mode_sense(SCSIRequest *req, uint8_t *outbuf)
|
||||
|
||||
p[1] = 0; /* Default media type. */
|
||||
p[3] = 0; /* Block descriptor length. */
|
||||
if (bdrv_get_type_hint(s->bs) == BDRV_TYPE_CDROM ||
|
||||
bdrv_is_read_only(s->bs)) {
|
||||
if (bdrv_is_read_only(s->bs)) {
|
||||
p[2] = 0x80; /* Readonly. */
|
||||
}
|
||||
p += 4;
|
||||
|
Loading…
Reference in New Issue
Block a user