summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2010-06-02 00:47:15 +0000
committerChris Johns <chrisj@rtems.org>2010-06-02 00:47:15 +0000
commit558a5f48fc8295dcb51735ffa1c841ac9ab67d23 (patch)
tree3ad3d8c8ae16a7bd241b4992f0227387bc6e71bd
parent2010-06-01 Chris Johns <chrisj@rtems.org> (diff)
downloadrtems-558a5f48fc8295dcb51735ffa1c841ac9ab67d23.tar.bz2
2010-06-02 Chris Johns <chrisj@rtems.org>
* fileio/init.c: Update to new mount API. * iostream/init.cc: Hack to work around confdefs.h in C++. * iostream/system.h: Add comment about base miniIMFS.
-rw-r--r--testsuites/samples/ChangeLog6
-rw-r--r--testsuites/samples/fileio/init.c40
-rw-r--r--testsuites/samples/iostream/init.cc4
-rw-r--r--testsuites/samples/iostream/system.h1
4 files changed, 32 insertions, 19 deletions
diff --git a/testsuites/samples/ChangeLog b/testsuites/samples/ChangeLog
index 37a53b3e8a..0f6951f01c 100644
--- a/testsuites/samples/ChangeLog
+++ b/testsuites/samples/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-02 Chris Johns <chrisj@rtems.org>
+
+ * fileio/init.c: Update to new mount API.
+ * iostream/init.cc: Hack to work around confdefs.h in C++.
+ * iostream/system.h: Add comment about base miniIMFS.
+
2010-04-04 Ralf Corsépius <ralf.corsepius@rtems.org>
* capture/init.c: Remove unused variable "out".
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index 5d2945dc34..0559f91016 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -44,50 +44,50 @@
*/
fstab_t fs_table[] = {
{
- "/dev/hda1","/mnt/hda1",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hda1","/mnt/hda1", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hda2","/mnt/hda2",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hda2","/mnt/hda2", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hda3","/mnt/hda3",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hda3","/mnt/hda3", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hda4","/mnt/hda4",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hda4","/mnt/hda4", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hdc1","/mnt/hdc1",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hdc1","/mnt/hdc1", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hdc2","/mnt/hdc2",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hdc2","/mnt/hdc2", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hdc3","/mnt/hdc3",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hdc3","/mnt/hdc3", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
},
{
- "/dev/hdc4","/mnt/hdc4",
- &msdos_ops, RTEMS_FILESYSTEM_READ_WRITE,
+ "/dev/hdc4","/mnt/hdc4", "dosfs",
+ RTEMS_FILESYSTEM_READ_WRITE,
FSMOUNT_MNT_OK | FSMOUNT_MNTPNT_CRTERR | FSMOUNT_MNT_FAILED,
0
}
@@ -321,13 +321,13 @@ static bool fileio_str2size(const char *str,uint32_t *res_ptr)
if (1 > sscanf(str,"%lu%c",&size,&suffix)) {
failed = true;
}
- else if (toupper(suffix) == 'K') {
+ else if (toupper((int)suffix) == 'K') {
size *= 1024;
}
- else if (toupper(suffix) == 'M') {
+ else if (toupper((int)suffix) == 'M') {
size *= 1024UL*1024UL;
}
- else if (isalpha(suffix)) {
+ else if (isalpha((int)suffix)) {
failed = true;
}
@@ -743,6 +743,8 @@ static rtems_shell_alias_t Shell_USERECHO_Alias = {
#define CONFIGURE_SHELL_COMMANDS_INIT
#define CONFIGURE_SHELL_COMMANDS_ALL
#define CONFIGURE_SHELL_MOUNT_MSDOS
+#define CONFIGURE_SHELL_MOUNT_RFS
+#define CONFIGURE_SHELL_DEBUGRFS
#include <rtems/shellconfig.h>
#endif
diff --git a/testsuites/samples/iostream/init.cc b/testsuites/samples/iostream/init.cc
index 26fb7b754b..2f0e3944f8 100644
--- a/testsuites/samples/iostream/init.cc
+++ b/testsuites/samples/iostream/init.cc
@@ -20,8 +20,11 @@
* $Id$
*/
+extern "C" {
+
#define CONFIGURE_INIT
#include "system.h"
+}
#if BSP_SMALL_MEMORY
#include <stdio.h>
@@ -31,6 +34,7 @@
#include <stdlib.h>
+
rtems_task Init(
rtems_task_argument ignored
)
diff --git a/testsuites/samples/iostream/system.h b/testsuites/samples/iostream/system.h
index d1033b5f51..4c4ab16582 100644
--- a/testsuites/samples/iostream/system.h
+++ b/testsuites/samples/iostream/system.h
@@ -32,6 +32,7 @@
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
#define CONFIGURE_EXTRA_TASK_STACKS RTEMS_MINIMUM_STACK_SIZE
+/* Only remove when this macro is removed from confdefs.h. It tests it. */
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
#include <rtems/confdefs.h>