Callers sometimes rely on the fact that the structures they pass in to
a system call won't be changed if the system call fails.  Our
automatically generated "senders" do the right thing -- they don't
modify any "out" parameters if the syscall failed.  Our special
switches need to do the same.


--------------------------
Beginning of statfs wisdom

Here is some info on statfs(). This call usually doesn't have a prototype
and you have to go to each machine to figure it out. I've done it for these
particular machines.. This information was current in Jul 1999.

Solaris 2.6/2.5.1

struct  statfs {
    short   f_fstyp;    /* File system type */
    long    f_bsize;    /* Block size */
    long    f_frsize;   /* Fragment size (if supported) */
    long    f_blocks;   /* Total number of blocks on file system */
    long    f_bfree;    /* Total number of free blocks */
    ino_t   f_files;    /* Total number of file nodes (inodes) */
    ino_t   f_ffree;    /* Total number of free file nodes */
    char    f_fname[6]; /* Volume name */
    char    f_fpack[6]; /* Pack name */
};

#if defined(__STDC__) && !defined(_KERNEL)
int statfs(const char *, struct statfs *, int, int);
int fstatfs(int, struct statfs *, int, int);
#endif

Linux-all flavors of libc

struct statfs {
	long    f_type;     /* type of filesystem (see below) */
	long    f_bsize;    /* optimal transfer block size */
	long    f_blocks;   /* total data blocks in file system */
	long    f_bfree;    /* free blocks in fs */
	long    f_bavail;   /* free blocks avail to non-superuser */
	long    f_files;    /* total file nodes in file system */
	long    f_ffree;    /* free file nodes in fs */
	fsid_t  f_fsid;     /* file system id */
	long    f_namelen;  /* maximum length of filenames */
	long    f_spare[6]; /* spare for later */
};
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);

OSF/1
struct statfs {     
    short   f_type;         /* type of filesystem (see below) */
    short   f_flags;        /* copy of mount flags */
    int f_fsize;        /* fundamental filesystem block size */
    int f_bsize;        /* optimal transfer block size */
    int f_blocks;       /* total data blocks in file system, */
                    /*  note: may not represent fs size. */
    int f_bfree;        /* free blocks in fs */
    int f_bavail;       /* free blocks avail to non-su */
    int f_files;        /* total file nodes in file system */
    int f_ffree;        /* free file nodes in fs */
    fsid_t  f_fsid;         /* file system id */
    int f_spare[9];     /* spare for later */
    char    f_mntonname[MNAMELEN];  /* directory on which mounted */
    char    f_mntfromname[MNAMELEN];/* mounted filesystem */
    union mount_info mount_info;    /* mount options */
};
       #include <sys/mount.h>
       int statfs(
            char *path,
            struct statfs *buffer,
            int length );
       int fstatfs(
            int file_descriptor,
            struct statfs *buffer,
            int length );

prolly not support this yet

       #include <sys/types.h>
       #include <ustat.h>
       int ustat(
            dev_t device,
            struct ustat *buffer );

HPUX

      #include <sys/vfs.h>

      int statfs(const char *path, struct statfs *buf);

      int fstatfs(int fildes, struct statfs *buf);

      The statfs() structure contains the following members:

           long     f_bavail;  /* free blocks available to non-superuser */
           long     f_bfree;   /* free blocks */
           long     f_blocks;  /* total blocks in file system */
           long     f_bsize;   /* fundamental file system block size in bytes **/
           long     f_ffree;   /* free file nodes in file system */
           long     f_files;   /* total file nodes in file system */
           long     f_type;    /* type of info, zero for now */
           fsid_t   f_fsid     /* file system ID.  f_fsid[1] is the file system
                                  type; see sysfs(2) */

      The fields f_blocks , f_bavail and f_bfree are expressed in terms of
      blocks of size f_bsize.

End of statfs() wisdom.
------------------------------

