Received: from eggs.gnu.org ([2001:4830:134:3::10]:51046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo4VL-0001hL-DV for qemu-devel@nongnu.org; Tue, 03 Dec 2013 23:56:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vo4V4-000696-Th for qemu-devel@nongnu.org; Tue, 03 Dec 2013 23:56:07 -0500 Received: from e23smtp09.au.ibm.com ([202.81.31.142]:34815) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vo4V4-00068i-4N for qemu-devel@nongnu.org; Tue, 03 Dec 2013 23:55:50 -0500 Received: from /spool/local by e23smtp09.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 4 Dec 2013 14:55:45 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 2934C2BB0052 for ; Wed, 4 Dec 2013 15:55:42 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rB44tGQ510420660 for ; Wed, 4 Dec 2013 15:55:29 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rB44tSUB021768 for ; Wed, 4 Dec 2013 15:55:28 +1100 From: Alexey Kardashevskiy Date: Wed, 4 Dec 2013 15:55:24 +1100 Message-Id: <1386132925-16728-3-git-send-email-aik@ozlabs.ru> In-Reply-To: <1386132925-16728-1-git-send-email-aik@ozlabs.ru> References: <1386132925-16728-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH 2/3] scsi-disk: check for meduim on ALLOW_MEDIUM_REMOVAL List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Paolo Bonzini This prevents the guest from preventing DVD medium removal when there is no medium. Without this, if the user has ejected a DVD, it is possible to have a block device with an open tray, no media but locked. Signed-off-by: Alexey Kardashevskiy --- hw/scsi/scsi-disk.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 08b6135..22b6859 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -1622,7 +1622,6 @@ static int32_t scsi_disk_emulate_command(SCSIRequest *req, uint8_t *buf) case RELEASE: case RELEASE_10: case START_STOP: - case ALLOW_MEDIUM_REMOVAL: case GET_CONFIGURATION: case GET_EVENT_STATUS_NOTIFICATION: case MECHANISM_STATUS: -- 1.8.4.rc4