From a652e6d52a0d403bc8ffebfc1a83e305eff42d2c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 23 Feb 2005 13:12:43 +0000 Subject: * cygwin.din (fstatvfs): Export. (statvfs): Export. * syscalls.cc: Include sys/statvfs.h. (statvfs): New function. Move statfs functionality here. (fstatvfs): New function. (statfs): Just call statvfs and copy structure. Check validity of incoming struct statfs pointer. * include/cygwin/types.h (fsblkcnt_t): Define. (fsfilcnt_t): Define. * include/cygwin/version.h: Bump API minor version. * include/sys/statvfs.h: New file. --- winsup/cygwin/include/sys/statvfs.h | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 winsup/cygwin/include/sys/statvfs.h (limited to 'winsup/cygwin/include/sys/statvfs.h') diff --git a/winsup/cygwin/include/sys/statvfs.h b/winsup/cygwin/include/sys/statvfs.h new file mode 100644 index 000000000..a32c19866 --- /dev/null +++ b/winsup/cygwin/include/sys/statvfs.h @@ -0,0 +1,41 @@ +/* sys/statvfs.h + + Copyright 2005 Red Hat, Inc. + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please consult the file "CYGWIN_LICENSE" for +details. */ + +#ifndef _SYS_STATVFS_H_ +#define _SYS_STATVFS_H_ + +#include + +struct statvfs { + unsigned long f_bsize; /* file system block size */ + unsigned long f_frsize; /* fragment size */ + fsblkcnt_t f_blocks; /* size of fs in f_frsize units */ + fsblkcnt_t f_bfree; /* free blocks in fs */ + fsblkcnt_t f_bavail; /* free blocks avail to non-superuser */ + fsfilcnt_t f_files; /* total file nodes in file system */ + fsfilcnt_t f_ffree; /* free file nodes in fs */ + fsfilcnt_t f_favail; /* avail file nodes in fs */ + unsigned long f_fsid; /* file system id */ + unsigned long f_flag; /* mount flags */ + unsigned long f_namemax; /* maximum length of filenames */ +}; + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +int statvfs (const char *__path, struct statvfs *__buf); +int fstatvfs (int __fd, struct statvfs *__buf); + +#ifdef __cplusplus +}; +#endif /* __cplusplus */ + +#endif /*_SYS_STATVFS_H_*/ -- cgit v1.2.3