forked from Hay1tsme/segatools
Revert "amex/nvram.c: Relax file sharing mode"
This reverts commit 9b47b51bf2b83d7d5a242e38ea6b41b120371e80.
This commit is contained in:
parent
d19b44e3a7
commit
a34d845730
17
amex/nvram.c
17
amex/nvram.c
@ -21,25 +21,10 @@ HRESULT nvram_open_file(HANDLE *out, const wchar_t *path, size_t size)
|
|||||||
|
|
||||||
*out = NULL;
|
*out = NULL;
|
||||||
|
|
||||||
/* This is somewhat sloppy: allow multiple processes to open the backing
|
|
||||||
store simultaneously. Multiple processes don't actually need to open
|
|
||||||
the backing store simultaneously, but it allows use to reuse the same
|
|
||||||
chunihook.dll for both chuniApp.exe and aimeReaderHost.exe, since a
|
|
||||||
backing store fd gets opened during process init and subsequentely
|
|
||||||
re-used for all device open operations on that NVRAM.
|
|
||||||
|
|
||||||
We could defer the file open until it is actually needed instead, but
|
|
||||||
this requires some messy locking; naive solutions would be racy or would
|
|
||||||
effectively block all but one thread at a time in the process from
|
|
||||||
performing any I/O.
|
|
||||||
|
|
||||||
Hopefully some day Chunithm will move to the new amdaemon-based system
|
|
||||||
architecture. */
|
|
||||||
|
|
||||||
file = CreateFileW(
|
file = CreateFileW(
|
||||||
path,
|
path,
|
||||||
GENERIC_READ | GENERIC_WRITE,
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_READ,
|
||||||
NULL,
|
NULL,
|
||||||
OPEN_ALWAYS,
|
OPEN_ALWAYS,
|
||||||
FILE_ATTRIBUTE_NORMAL,
|
FILE_ATTRIBUTE_NORMAL,
|
||||||
|
Loading…
Reference in New Issue
Block a user