Mercurial > ecos
changeset 2272:e5c118746536
* include/fileio.h : Added a key and a structure to extract the
disk size and the available free space for a filesystem using
the cyg_fs_getinfo() interface.
| author | asl |
|---|---|
| date | Sat, 12 Aug 2006 07:23:41 +0000 |
| parents | fd2c3f3def9d |
| children | 4a81fad4d2b4 |
| files | packages/io/fileio/current/ChangeLog packages/io/fileio/current/cdl/fileio.cdl packages/io/fileio/current/include/fileio.h |
| diffstat | 3 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,9 @@ +2006-05-18 Paul Fine <pfine@dtccom.com> + + * include/fileio.h : Added a key and a structure to extract the + disk size and the available free space for a filesystem using + the cyg_fs_getinfo() interface. + 2006-05-17 Andy Jackson <andy@grapevinetech.co.uk> * tests/fileio1.c: Compiler warning fixes.
--- a/packages/io/fileio/current/cdl/fileio.cdl +++ b/packages/io/fileio/current/cdl/fileio.cdl @@ -224,6 +224,15 @@ cdl_package CYGPKG_IO_FILEIO { } + cdl_option CYGSEM_FILEIO_INFO_DISK_USAGE { + display "cyg_fs_getinfo call for disk usage" + flavor bool + default_value 0 + description " + Enabling this option includes code in some filesystems to + implement a call using cyg_fs_getinfo to return the current + filesystem block usage." + } # ---------------------------------------------------------------- # Tests
--- a/packages/io/fileio/current/include/fileio.h +++ b/packages/io/fileio/current/include/fileio.h @@ -159,7 +159,9 @@ struct cyg_fstab_entry #define FS_INFO_GETCWD 3 /* getcwd() */ #define FS_INFO_SYNC 4 /* cyg_fs_fssync() */ #define FS_INFO_ATTRIB 5 /* cyg_fs_(get|set)_attrib() */ - +#ifdef CYGSEM_FILEIO_INFO_DISK_USAGE +#define FS_INFO_DISK_USAGE 6 /* get_disk_usage() */ +#endif //----------------------------------------------------------------------------- // Types for link() @@ -175,6 +177,12 @@ struct cyg_getcwd_info size_t size; /* size of buffer */ }; +struct cyg_fs_disk_usage{ + cyg_uint64 total_blocks; + cyg_uint64 free_blocks; + cyg_uint32 block_size; +}; + typedef cyg_uint32 cyg_fs_attrib_t; //-----------------------------------------------------------------------------
