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.
This commit is contained in:
Ralf Corsepius
2011-10-13 13:44:40 +00:00
parent 7036ed0049
commit c1b890c8bd
4 changed files with 13 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 );

View File

@@ -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 );