This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Add functionality to extract disk usage from FAT FS
- From: Andrew Lunn <andrew at lunn dot ch>
- To: "Fine, Paul" <Paul_Fine at dtccom dot com>
- Cc: "'ecos-patches at ecos dot sourceware dot org'" <ecos-patches at ecos dot sourceware dot org>
- Date: Thu, 18 May 2006 16:37:01 +0200
- Subject: Re: Add functionality to extract disk usage from FAT FS
- References: <F7F756E5ED50F345959AE893AD2F15660A1613@dtcsrvr09.dtccom.com>
On Thu, May 18, 2006 at 10:09:44AM -0400, Fine, Paul wrote:
+struct cyg_fs_disk_usage{
+ cyg_uint32 total_clusters;
+ cyg_uint32 free_clusters;
+ cyg_uint32 cluster_size;
+};
Clusters are very much a M$ FAT thing. I would prefer a more generic
name, eg blocks, so that the same structure can be used by other
filesystems.
Is a uint32 the correct type? Assuming 1Kbyte blocks this allows a
maximum disk size of (1 << 42) which is (1 << 12) Gbytes, ie 4Tbytes.
Yes, that will probably be O.K. for most embedded system for a while.
The only problem could be with filesystems which are not block
based. They are then likely to simply report with blocks of size 1 and
then we are limited to 4Gbytes, which is not that big.
Andrew