kernelbase: Translate FILE_FLAG_SEQUENTIAL_SCAN.

Translate FILE_FLAG_SEQUENTIAL_SCAN into the corresponding flag for
NtCreateFile options

Signed-off-by: Luke Deller <luke@deller.id.au>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Luke Deller 2021-08-04 21:29:35 +10:00 committed by Alexandre Julliard
parent 1ca67c8ba2
commit 8294b2c8ad
1 changed files with 3 additions and 0 deletions

View File

@ -723,6 +723,8 @@ static UINT get_nt_file_options( DWORD attributes )
options |= FILE_SYNCHRONOUS_IO_NONALERT; options |= FILE_SYNCHRONOUS_IO_NONALERT;
if (attributes & FILE_FLAG_RANDOM_ACCESS) if (attributes & FILE_FLAG_RANDOM_ACCESS)
options |= FILE_RANDOM_ACCESS; options |= FILE_RANDOM_ACCESS;
if (attributes & FILE_FLAG_SEQUENTIAL_SCAN)
options |= FILE_SEQUENTIAL_ONLY;
if (attributes & FILE_FLAG_WRITE_THROUGH) if (attributes & FILE_FLAG_WRITE_THROUGH)
options |= FILE_WRITE_THROUGH; options |= FILE_WRITE_THROUGH;
return options; return options;
@ -3227,6 +3229,7 @@ HANDLE WINAPI DECLSPEC_HOTPATCH OpenFileById( HANDLE handle, LPFILE_ID_DESCRIPTO
if (flags & FILE_FLAG_NO_BUFFERING) options |= FILE_NO_INTERMEDIATE_BUFFERING; if (flags & FILE_FLAG_NO_BUFFERING) options |= FILE_NO_INTERMEDIATE_BUFFERING;
if (!(flags & FILE_FLAG_OVERLAPPED)) options |= FILE_SYNCHRONOUS_IO_NONALERT; if (!(flags & FILE_FLAG_OVERLAPPED)) options |= FILE_SYNCHRONOUS_IO_NONALERT;
if (flags & FILE_FLAG_RANDOM_ACCESS) options |= FILE_RANDOM_ACCESS; if (flags & FILE_FLAG_RANDOM_ACCESS) options |= FILE_RANDOM_ACCESS;
if (flags & FILE_FLAG_SEQUENTIAL_SCAN) options |= FILE_SEQUENTIAL_ONLY;
flags &= FILE_ATTRIBUTE_VALID_FLAGS; flags &= FILE_ATTRIBUTE_VALID_FLAGS;
objectName.Length = sizeof(ULONGLONG); objectName.Length = sizeof(ULONGLONG);