home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / uucp-1.04 / unix / bytfre.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-13  |  339 b   |  20 lines

  1. /* bytfre.c
  2.    Get the number of bytes free on a file system.  */
  3.  
  4. #include "uucp.h"
  5.  
  6. #include "system.h"
  7. #include "sysdep.h"
  8. #include "fsusg.h"
  9.  
  10. long
  11. csysdep_bytes_free (zfile)
  12.      const char *zfile;
  13. {
  14.   struct fs_usage s;
  15.  
  16.   if (get_fs_usage ((char *) zfile, (char *) NULL, &s) < 0)
  17.     return -1;
  18.   return s.fsu_bavail * (long) 512;
  19. }
  20.