From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Npjcw-0004mw-9J for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:42 -0500 Received: from [199.232.76.173] (port=55454 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Npjcv-0004m9-Mg for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:41 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Npjcu-0007IH-Jk for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Npjcu-0007I9-5i for qemu-devel@nongnu.org; Thu, 11 Mar 2010 09:44:40 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2BEicL4026549 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 11 Mar 2010 09:44:38 -0500 Received: from localhost.localdomain (dhcp-0-60.tlv.redhat.com [10.35.0.60]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2BEiZSP005186 for ; Thu, 11 Mar 2010 09:44:37 -0500 From: Naphtali Sprei Date: Thu, 11 Mar 2010 16:44:34 +0200 Message-Id: <1268318674-10607-2-git-send-email-nsprei@redhat.com> In-Reply-To: <1268318674-10607-1-git-send-email-nsprei@redhat.com> References: <1268318674-10607-1-git-send-email-nsprei@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] read-only: Another minor cleanup List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Don't rely on CDROM hint for read_only attribute Signed-off-by: Naphtali Sprei --- 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 8f7ffc1..5cd6ae6 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -612,8 +612,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; -- 1.6.3.3