diff --git a/EmulatorPkg/Unix/Host/BlockIo.c b/EmulatorPkg/Unix/Host/BlockIo.c index 50fe9b575e..fa05fbc107 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;