From: "Ni, Ray" <ray.ni@intel.com>
To: devel@edk2.groups.io
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Andrew Fish <afish@apple.com>,
Zhiguang Liu <zhiguang.liu@intel.com>,
Hao A Wu <hao.a.wu@intel.com>
Subject: [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe
Date: Fri, 14 Jun 2019 16:23:27 +0800 [thread overview]
Message-ID: <20190614082327.80128-1-ray.ni@intel.com> (raw)
When running 2nd instance of WinHost.exe, below error is printed:
ERROR : Can not open Firmware Device File ../FV/FV_RECOVERY.fd...
The root cause is "RECOVERY.FD" is exclusively opened by the first
instance of WinHost.exe.
The patch changes to open "RECOVERY.FD" in shared way so that
2nd+ instance of WinHost.exe can still run successfully.
Signed-off-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
---
EmulatorPkg/Win/Host/WinHost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/EmulatorPkg/Win/Host/WinHost.c b/EmulatorPkg/Win/Host/WinHost.c
index bd7662683a..5a354d084e 100644
--- a/EmulatorPkg/Win/Host/WinHost.c
+++ b/EmulatorPkg/Win/Host/WinHost.c
@@ -269,7 +269,7 @@ Returns:
NtFileHandle = CreateFile (
FileName,
GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE,
- FILE_SHARE_READ,
+ FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
CreationDisposition,
FILE_ATTRIBUTE_NORMAL,
--
2.21.0.windows.1
next reply other threads:[~2019-06-14 8:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 8:23 Ni, Ray [this message]
2019-06-14 8:44 ` [edk2-devel] [PATCH] EmulatorPkg/Win: support running multiple WinHost.exe Yao, Jiewen
2019-06-14 8:53 ` Ni, Ray
[not found] ` <15A804AED7A7D734.10316@groups.io>
2019-06-17 7:02 ` Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190614082327.80128-1-ray.ni@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox