mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07: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:
committed by
Anthony Liguori
parent
07108b29c5
commit
0056dcc114
+1
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user