summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/rfs/rtems-rfs-shell.c
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-02-22 23:02:41 +0000
committerChris Johns <chrisj@rtems.org>2010-02-22 23:02:41 +0000
commit59762963b2c74d67b5db42ad7589e69b706af067 (patch)
tree57e0c1407d5fd2894f641365d5610a56ec38bd2f /cpukit/libfs/src/rfs/rtems-rfs-shell.c
parent2010-02-20 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-59762963b2c74d67b5db42ad7589e69b706af067.tar.bz2
2010-02-23 Chris Johns <chrisj@rtems.org>
* libfs/src/rfs/rtems-rfs-dir.c: Fix printf format warning for a 64bit off_t. * libfs/src/rfs/rtems-rfs-file-system.h: Add a macro to get the file system flags. * libfs/src/rfs/rtems-rfs-group.c, libfs/src/rfs/rtems-rfs-group.h: Add rtems_rfs_group_usage. * libfs/src/rfs/rtems-rfs-rtems.c: Fill in all the fields in the statvfs struct. * libfs/src/rfs/rtems-rfs-shell.c: Use rtems_rfs_group_usage.
Diffstat (limited to 'cpukit/libfs/src/rfs/rtems-rfs-shell.c')
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-shell.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-shell.c b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
index 1bc979a1ea..afec832af9 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-shell.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-shell.c
@@ -140,20 +140,8 @@ rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
rtems_rfs_shell_lock_rfs (fs);
- blocks = 0;
- inodes = 0;
+ rtems_rfs_group_usage (fs, &blocks, &inodes);
- for (g = 0; g < fs->group_count; g++)
- {
- rtems_rfs_group* group = &fs->groups[g];
- blocks +=
- rtems_rfs_bitmap_map_size(&group->block_bitmap) -
- rtems_rfs_bitmap_map_free (&group->block_bitmap);
- inodes +=
- rtems_rfs_bitmap_map_size (&group->inode_bitmap) -
- rtems_rfs_bitmap_map_free (&group->inode_bitmap);
- }
-
rtems_rfs_shell_unlock_rfs (fs);
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);