Mail Archives: djgpp-workers/1998/01/26/16:24:14
--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"
Hello all,
Here is that patch to stat to allow file system extensions to be stat'd
(not to be confused with fstat'd -- I believe I've already sent that patch
in... 8-). It works as an open handler call. Previously I had suggested
that maybe opening the file and the fstat'ing it would be a good way to
keep things simple. I've decided not to propose that since it sometimes
wouldn't work (if the file was already exclusively opened) and sometimes
would be wrong (eg, the st_atime field could/should be modified by the
open...).
So attached is the diff to stat.c that lets fsextsbe stat'd.
Randy
randym AT acm DOT org
--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="stat.dif"
*** src\libc\posix\sys\stat\stat.c~1 Sun Nov 16 14:04:58 1997
--- src\libc\posix\sys\stat\stat.c Mon Jan 26 15:01:46 1998
***************
*** 108,112 ****
#include <dos.h>
#include <dir.h>
!
#include <dpmi.h>
#include <go32.h>
--- 108,112 ----
#include <dos.h>
#include <dir.h>
! #include <sys/fsext.h>
#include <dpmi.h>
#include <go32.h>
***************
*** 825,829 ****
{
int e = errno;
! int pathlen;
if (!path || !statbuf)
--- 825,829 ----
{
int e = errno;
! int pathlen, ret;
if (!path || !statbuf)
***************
*** 845,848 ****
--- 845,851 ----
return -1;
}
+
+ if (__FSEXT_call_open_handlers(__FSEXT_stat, &ret, &path))
+ return ret;
if (stat_assist(path, statbuf) == -1)
--=====================_885871560==_
Content-Type: text/plain; charset="us-ascii"
--=====================_885871560==_--
- Raw text -