fstat.html 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <html>
  2. <head>
  3. <title>fstat</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>fstat</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. fstat - get file state information
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;unistd.h&gt;<br>
  13. <br>
  14. int<br>
  15. fstat(int <em>fd</em>, struct stat *<em>statbuf</em>);
  16. <h3>Description</h3>
  17. fstat retrieves status information about the file referred to by the
  18. file handle <em>fd</em> and stores it in the stat structure pointed to
  19. by <em>statbuf</em>.
  20. <h3>Return Values</h3>
  21. On success, fstat returns 0. On error, -1 is returned, and
  22. <A HREF=errno.html>errno</A> is set according to the error
  23. encountered.
  24. <h3>Errors</h3>
  25. The following error codes should be returned under the conditions
  26. given. Other error codes may be returned for other errors not
  27. mentioned here.
  28. <blockquote><table width=90%>
  29. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  30. <tr><td>EBADF</td> <td><em>fd</em> is not a valid file handle.</td></tr>
  31. <tr><td>EIO</td> <td>A hard I/O error occurred.</td></tr>
  32. <tr><td>EFAULT</td> <td><em>statbuf</em> points to an invalid address.</td></tr>
  33. </table></blockquote>
  34. </body>
  35. </html>