summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2015-12-23 01:34:09 +0000
committerhwu1225 <hwu1225@Edk2>2015-12-23 01:34:09 +0000
commitdbbf51f6bde01d36956a29543ba3ac325b41e729 (patch)
treed4d5feee0ab2b760b89bef10330250d56f00ecb2
parent004b82b369eb3070695a2ed1163235bbab20f3e3 (diff)
downloadedk2-platforms-dbbf51f6bde01d36956a29543ba3ac325b41e729.tar.xz
MdeModulePkg ScsiDiskDxe: Set block I/O media of SCSI CDROM to read-only
(Sync patch r19443 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19464 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
index d83fa24a4f..8d8209b121 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;
}