projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7497838
)
Added handling for std handles.
author
Hartmut Birr
<osexpert@googlemail.com>
Mon, 1 Apr 2002 22:03:56 +0000
(22:03 +0000)
committer
Hartmut Birr
<osexpert@googlemail.com>
Mon, 1 Apr 2002 22:03:56 +0000
(22:03 +0000)
svn path=/trunk/; revision=2807
reactos/lib/msvcrt/sys_stat/fstat.c
patch
|
blob
|
history
diff --git
a/reactos/lib/msvcrt/sys_stat/fstat.c
b/reactos/lib/msvcrt/sys_stat/fstat.c
index
fca4278
..
b19cb26
100644
(file)
--- a/
reactos/lib/msvcrt/sys_stat/fstat.c
+++ b/
reactos/lib/msvcrt/sys_stat/fstat.c
@@
-26,6
+26,14
@@
int _fstat(int fd, struct stat *statbuf)
return -1;
}
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);
if (!GetFileInformationByHandle(_get_osfhandle(fd),&FileInformation))
{
__set_errno(EBADF);