From 2c5ce61d06dcedd3f1a9cd3300deb671e448e55a Mon Sep 17 00:00:00 2001 From: andrewfish Date: Sat, 7 Jan 2012 00:30:52 +0000 Subject: Fix bug where open() mode was not being set based on type of device being emulated. signed-off-by:andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12917 6f19259b-4bc3-4df7-8a09-765794883524 --- EmulatorPkg/Unix/Host/BlockIo.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'EmulatorPkg') diff --git a/EmulatorPkg/Unix/Host/BlockIo.c b/EmulatorPkg/Unix/Host/BlockIo.c index 50fe9b5..fa05fbc 100644 --- a/EmulatorPkg/Unix/Host/BlockIo.c +++ b/EmulatorPkg/Unix/Host/BlockIo.c @@ -661,6 +661,8 @@ EmuBlockIoThunkOpen ( } } + Private->Mode = Private->WriteProtected ? O_RDONLY : O_RDWR; + This->Interface = &Private->EmuBlockIo; This->Private = Private; return EFI_SUCCESS; -- cgit v1.1