diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-13 13:44:40 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-10-13 13:44:40 +0000 |
commit | c1b890c8bd475419a31c24f2565721cfa573a0d8 (patch) | |
tree | 95bbd32ca76be54b449157e0113050b21f4a39ba /testsuites | |
parent | 2011-10-13 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-c1b890c8bd475419a31c24f2565721cfa573a0d8.tar.bz2 |
2011-10-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for size of mode_t.
* psxfile01/test.c, psxstat/test.c: Include "primode.h".
Use PRIomode_t to print mode_t.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/ChangeLog | 6 | ||||
-rw-r--r-- | testsuites/psxtests/configure.ac | 1 | ||||
-rw-r--r-- | testsuites/psxtests/psxfile01/test.c | 4 | ||||
-rw-r--r-- | testsuites/psxtests/psxstat/test.c | 4 |
4 files changed, 13 insertions, 2 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index e836866d46..48a6cd6229 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,9 @@ +2011-10-13 Ralf Corsépius <ralf.corsepius@rtems.org> + + * configure.ac: Check for size of mode_t. + * psxfile01/test.c, psxstat/test.c: Include "primode.h". + Use PRIomode_t to print mode_t. + 2011-10-12 Sebastian Huber <sebastian.huber@embedded-brains.de> * psxaio01/system.h, psxaio02/system.h, psxaio03/system.h: Do not use diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac index 9fe18ea5b6..98156d9746 100644 --- a/testsuites/psxtests/configure.ac +++ b/testsuites/psxtests/configure.ac @@ -79,6 +79,7 @@ AC_CHECK_SIZEOF([off_t]) AC_CHECK_SIZEOF([blksize_t]) AC_CHECK_SIZEOF([blkcnt_t]) AC_CHECK_SIZEOF([time_t]) +AC_CHECK_SIZEOF([mode_t]) # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c index dd6e4d0095..f6b290597e 100644 --- a/testsuites/psxtests/psxfile01/test.c +++ b/testsuites/psxtests/psxfile01/test.c @@ -40,6 +40,8 @@ #include <rtems.h> #include <rtems/libio.h> +#include "primode.h" + void test_case_reopen_append(void); char test_write_buffer[ 1024 ]; @@ -86,7 +88,7 @@ void dump_statbuf( struct stat *buf ) printf( "....st_dev (0x%x:0x%x)\n", major1, minor1 ); printf( "....st_ino %" PRIxino_t " may vary by small amount\n", buf->st_ino ); - printf( "....mode = %08o\n", (unsigned int) buf->st_mode ); + printf( "....mode = %08" PRIomode_t "\n", buf->st_mode ); printf( "....nlink = %d\n", buf->st_nlink ); printf( "....uid = %d\n", buf->st_uid ); diff --git a/testsuites/psxtests/psxstat/test.c b/testsuites/psxtests/psxstat/test.c index 0694bea533..e3b7f23b8e 100644 --- a/testsuites/psxtests/psxstat/test.c +++ b/testsuites/psxtests/psxstat/test.c @@ -33,6 +33,8 @@ #include <rtems/imfs.h> #include <pmacros.h> +#include "primode.h" + #define MAXSYMLINK 5 /* There needs to be a better way of getting this. */ #define TIMEOUT_VALUE ( 5 * rtems_clock_get_ticks_per_second() ) @@ -211,7 +213,7 @@ void stat_a_file_helper( printf("\n...st_dev (0x%x:0x%x)\n", major1, minor1 ); printf( "...st_ino %" PRIxino_t "\n", statbuf.st_ino ); - printf( "...st_mode %o\n", (unsigned int) statbuf.st_mode ); + printf( "...st_mode %" PRIomode_t "\n", statbuf.st_mode ); printf( "...st_nlink %x\n", statbuf.st_nlink ); printf( "...st_uid %d\n", statbuf.st_uid ); printf( "...st_gid %d\n", statbuf.st_gid ); |