mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
Added handling for std handles.
svn path=/trunk/; revision=2807
This commit is contained in:
parent
7497838509
commit
ea5f41e8a5
1 changed files with 8 additions and 0 deletions
|
@ -26,6 +26,14 @@ int _fstat(int fd, struct stat *statbuf)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (fd >= 0 && fd <= 4)
|
||||
{
|
||||
memset(statbuf, 0, sizeof(struct stat));
|
||||
statbuf->st_dev = fd;
|
||||
statbuf->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!GetFileInformationByHandle(_get_osfhandle(fd),&FileInformation))
|
||||
{
|
||||
__set_errno(EBADF);
|
||||
|
|
Loading…
Reference in a new issue