freebsd-dev/gnu/libexec/uucp/libunix/bytfre.c

20 lines
339 B
C
Raw Normal View History

1993-08-05 18:28:27 +00:00
/* bytfre.c
Get the number of bytes free on a file system. */
#include "uucp.h"
#include "system.h"
#include "sysdep.h"
#include "fsusg.h"
long
csysdep_bytes_free (zfile)
const char *zfile;
{
struct fs_usage s;
if (get_fs_usage ((char *) zfile, (char *) NULL, &s) < 0)
return -1;
return s.fsu_bavail * (long) 512;
}