From 0056dcc1146545e7c814db83b7b7b62e0c93ac68 Mon Sep 17 00:00:00 2001 From: Naphtali Sprei Date: Thu, 11 Mar 2010 16:44:34 +0200 Subject: read-only: Another minor cleanup Don't rely on CDROM hint for read_only attribute Signed-off-by: Naphtali Sprei Signed-off-by: Anthony Liguori --- hw/scsi-disk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'hw') 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; -- cgit v1.1