diff options
author | Naphtali Sprei <nsprei@redhat.com> | 2010-03-11 16:44:34 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-03-17 11:16:15 -0500 |
commit | 0056dcc1146545e7c814db83b7b7b62e0c93ac68 (patch) | |
tree | cfc420422a4cb1f8751a1bba0ec294f32f4ceb49 /hw | |
parent | 07108b29c5f3b01f8c8f511d2af16ad33aa6b2d3 (diff) | |
download | qemu-0056dcc1146545e7c814db83b7b7b62e0c93ac68.zip qemu-0056dcc1146545e7c814db83b7b7b62e0c93ac68.tar.gz qemu-0056dcc1146545e7c814db83b7b7b62e0c93ac68.tar.bz2 |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/scsi-disk.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index e64fbf1..1fbd4ee 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -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; |