delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/01/07/14:32:40

Message-Id: <3.0.1.32.19980107133539.007d4570@yacker.xiotech.com>
Date: Wed, 07 Jan 1998 13:35:39 -0600
To: djgpp-workers AT delorie DOT com
From: Randy Maas <randym AT acm DOT org>
Subject: patch for fstat
Mime-Version: 1.0

--=====================_884223339==_
Content-Type: text/plain; charset="us-ascii"

This makes it possible for a fsext to give a status report on its file
descriptor
Randy
--=====================_884223339==_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: attachment; filename="fstat.dif"

*** /local/src/libc/posix/sys/stat/fstat.c~1	Thu Jan  1 23:32:22 1998
--- /local/src/libc/posix/sys/stat/fstat.c	Wed Jan  7 13:11:20 1998
***************
*** 107,111 ****
  #include <libc/farptrgs.h>
  #include <libc/bss.h>
! 
  #include "xstat.h"
  
--- 107,111 ----
  #include <libc/farptrgs.h>
  #include <libc/bss.h>
! #include <sys/fsext.h>
  #include "xstat.h"
  
***************
*** 840,843 ****
--- 840,845 ----
  {
    int            e = errno;     /* save previous value of errno */
+   __FSEXT_function* func;
+   int rv;
  
    if (!statbuf)
***************
*** 845,848 ****
--- 847,857 ----
        errno = EFAULT;
        return -1;
+     }
+ 
+   /* see if this is file system extension file */
+   func = __FSEXT_get_function(handle);
+   if (func && func(__FSEXT_fstat, &rv, &handle))
+     {
+        return rv;
      }
  

--=====================_884223339==_
Content-Type: text/plain; charset="us-ascii"



--=====================_884223339==_--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019