Do not call NtFlushBuffersFile for console handles.

svn path=/trunk/; revision=2920
This commit is contained in:
Hartmut Birr 2002-05-07 22:21:47 +00:00
parent 8aa6e0e7f6
commit 652f529412

View file

@ -1,4 +1,4 @@
/* $Id: file.c,v 1.31 2002/04/27 19:15:00 hbirr Exp $ /* $Id: file.c,v 1.32 2002/05/07 22:21:47 hbirr Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -160,6 +160,11 @@ FlushFileBuffers(HANDLE hFile)
NTSTATUS errCode; NTSTATUS errCode;
IO_STATUS_BLOCK IoStatusBlock; IO_STATUS_BLOCK IoStatusBlock;
if (IsConsoleHandle(hFile))
{
return FALSE;
}
errCode = NtFlushBuffersFile(hFile, errCode = NtFlushBuffersFile(hFile,
&IoStatusBlock); &IoStatusBlock);
if (!NT_SUCCESS(errCode)) if (!NT_SUCCESS(errCode))
@ -267,7 +272,7 @@ GetFileType(HANDLE hFile)
} }
/* check console handles */ /* check console handles */
if (((ULONG)hFile & 3) == 3) if (IsConsoleHandle(hFile))
{ {
// if (VerifyConsoleHandle(hFile)) // if (VerifyConsoleHandle(hFile))
return FILE_TYPE_CHAR; return FILE_TYPE_CHAR;