summaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/bytfre.c
blob: 568eebe0307aed0050fc071ecffdbfe1c101ab2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* 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;
}
OpenPOWER on IntegriCloud