From a5d28900d21cd3de0235490c602d86daf9208b24 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Tue, 22 Dec 2015 13:53:26 +0000 Subject: [PATCH] MdeModulePkg ScsiDiskDxe: Set block I/O media of SCSI CDROM to read-only Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19443 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index eb50889943..88bce3f70c 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -256,6 +256,7 @@ ScsiDiskDriverBindingStart ( case EFI_SCSI_TYPE_CDROM: ScsiDiskDevice->BlkIo.Media->BlockSize = 0x800; + ScsiDiskDevice->BlkIo.Media->ReadOnly = TRUE; MustReadCapacity = FALSE; break; }