summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-06-07 15:35:24 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-06-07 15:35:24 +0000
commit7d01d244d7484056f8c0c101eb500fe8cfcfd9bb (patch)
tree87c02c82f7455420a9322d369477cb5a4565829f /cpukit/libmisc
parent2010-06-07 Bharath Suri <bharath.s.jois@gmail.com> (diff)
downloadrtems-7d01d244d7484056f8c0c101eb500fe8cfcfd9bb.tar.bz2
2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio_.h: Declare rtems_filesystem_mount_table_control. * libcsupport/include/rtems/libio.h: Removed rtems_filesystem_table_first(), rtems_filesystem_table_next() and rtems_filesystem_table_node_t declarations. Declare rtems_per_filesystem_routine, rtems_filesystem_iterate() and rtems_filesystem_get_mount_handler(). * libcsupport/src/mount.c: Added rtems_filesystem_mounts_first() and rtems_filesystem_mounts_next(). Simplify mount(). Removed rtems_filesystem_mount_table_control_init. Use rtems_filesystem_get_mount_handler(). * libcsupport/src/mount-mgr.c: Removed rtems_filesystem_mounts_first() and rtems_filesystem_mounts_next(). Added rtems_filesystem_iterate() and rtems_filesystem_get_mount_handler(). Use rtems_libio_lock() and rtems_libio_unlock(); * sapi/include/confdefs.h, libmisc/shell/main_mount.c: Update for mount API changes.
Diffstat (limited to 'cpukit/libmisc')
-rw-r--r--cpukit/libmisc/shell/main_mount.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/cpukit/libmisc/shell/main_mount.c b/cpukit/libmisc/shell/main_mount.c
index 8062001d6a..44a9c42665 100644
--- a/cpukit/libmisc/shell/main_mount.c
+++ b/cpukit/libmisc/shell/main_mount.c
@@ -27,6 +27,13 @@
#include <rtems/libio.h>
#include "internal.h"
+static bool print_filesystem(const rtems_filesystem_table_t *entry, void *arg)
+{
+ printf("%s ", entry->type);
+
+ return true;
+}
+
int rtems_shell_main_mount(
int argc,
char *argv[]
@@ -55,13 +62,8 @@ int rtems_shell_main_mount(
} else if (argv[arg][1] == 'r') {
options = RTEMS_FILESYSTEM_READ_ONLY;
} else if (argv[arg][1] == 'L') {
- const rtems_filesystem_table_t* fs;
- fs = rtems_filesystem_table_first();
printf ("File systems: ");
- while (fs) {
- printf ("%s ", fs->type);
- fs = rtems_filesystem_table_next(fs);
- }
+ rtems_filesystem_iterate(print_filesystem, NULL);
printf ("\n");
return 0;
} else if (argv[arg][1] == 'o') {