Changeset 9d20b9d in rtems


Ignore:
Timestamp:
Jun 16, 2010, 5:25:54 PM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10
Children:
c7f60bc3
Parents:
652cdab
Message:

2010-06-16 Ralf Corsépius <ralf.corsepius@…>

  • libfs/src/rfs/rtems-rfs-rtems.c: Various 64bit fixes. Add PRIomode_t.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r652cdab r9d20b9d  
    112010-06-16      Ralf Corsépius <ralf.corsepius@rtems.org>
    22
     3        * libfs/src/rfs/rtems-rfs-rtems.c: Various 64bit fixes.
     4        Add PRIomode_t.
    35        * libfs/src/rfs/rtems-rfs-buffer-bdbuf.c:
    46        Various 64bit fixes.
  • cpukit/libfs/src/rfs/rtems-rfs-rtems.c

    r652cdab r9d20b9d  
    2020#endif
    2121
     22#include <inttypes.h>
    2223#include <stdlib.h>
     24
     25#if SIZEOF_MODE_T == 8
     26#define PRIomode_t PRIo64
     27#elif SIZEOF_MODE_T == 4
     28#define PRIomode_t PRIo32
     29#else
     30#error "unsupport size of mode_t"
     31#endif
    2332
    2433#include <rtems/rfs/rtems-rfs-file.h>
     
    7382
    7483  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
    75     printf ("rtems-rfs-rtems: eval-path: in: path:%s pathlen:%zi ino:%ld\n",
     84    printf ("rtems-rfs-rtems: eval-path: in: path:%s pathlen:%zi ino:%" PRId32 "\n",
    7685            path, pathlen, ino);
    7786 
     
    180189      }
    181190      if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
    182         printf("rtems-rfs-rtems: eval-path: parent: ino:%ld\n", ino);
     191        printf("rtems-rfs-rtems: eval-path: parent: ino:%" PRId32 "\n", ino);
    183192    }
    184193    else
     
    198207      }   
    199208      if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
    200         printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%ld\n", node, ino);
     209        printf("rtems-rfs-rtems: eval-path: down: path:%s ino:%" PRId32 "\n", node, ino);
    201210    }
    202211
     
    219228
    220229  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
    221     printf("rtems-rfs-rtems: eval-path: ino:%ld\n", ino);
     230    printf("rtems-rfs-rtems: eval-path: ino:%" PRId32 "\n", ino);
    222231
    223232  return rc;
     
    251260
    252261  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
    253     printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%ld\n", path, ino);
     262    printf ("rtems-rfs-rtems: eval-for-make: path:%s ino:%" PRId32 "\n", path, ino);
    254263 
    255264  *name = path + strlen (path);
     
    378387      }
    379388      if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
    380         printf ("rtems-rfs-rtems: eval-for-make: parent: ino:%ld\n", ino);
     389        printf ("rtems-rfs-rtems: eval-for-make: parent: ino:%" PRId32 "\n", ino);
    381390    }
    382391    else
     
    394403      }
    395404      if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
    396         printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%ld\n",
     405        printf("rtems-rfs-rtems: eval-for-make: down: path:%s ino:%" PRId32 "\n",
    397406               node, ino);
    398407    }
     
    449458
    450459  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_FOR_MAKE))
    451     printf("rtems-rfs-rtems: eval-for-make: parent ino:%ld name:%s\n",
     460    printf("rtems-rfs-rtems: eval-for-make: parent ino:%" PRId32 " name:%s\n",
    452461           ino, *name);
    453462
     
    478487
    479488  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
    480     printf ("rtems-rfs-rtems: link: in: parent:%ld target:%ld\n",
     489    printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
    481490            parent, target);
    482491 
     
    516525 
    517526  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_UNLINK))
    518     printf("rtems-rfs-rtems: unlink: parent:%ld doff:%lu ino:%ld\n",
     527    printf("rtems-rfs-rtems: unlink: parent:%" PRId32 " doff:%" PRIu32 " ino:%" PRId32 "\n",
    519528           parent, doff, ino);
    520529 
     
    612621 
    613622  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
    614     printf ("rtems-rfs-rtems: chown: in: ino:%ld uid:%d gid:%d\n",
     623    printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
    615624            ino, owner, group);
    616625 
     
    776785 
    777786  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_READLINK))
    778     printf ("rtems-rfs-rtems: readlink: in: ino:%ld\n", ino);
     787    printf ("rtems-rfs-rtems: readlink: in: ino:%" PRId32 "\n", ino);
    779788 
    780789  rtems_rfs_rtems_lock (fs);
     
    813822
    814823  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FCHMOD))
    815     printf ("rtems-rfs-rtems: fchmod: in: ino:%ld mode:%06o\n",
    816             ino, (unsigned int) mode);
     824    printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
     825            ino, mode);
    817826 
    818827  rtems_rfs_rtems_lock (fs);
     
    893902
    894903  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_STAT))
    895     printf ("rtems-rfs-rtems: stat: in: ino:%ld\n", ino);
     904    printf ("rtems-rfs-rtems: stat: in: ino:%" PRId32 "\n", ino);
    896905
    897906  rtems_rfs_rtems_lock (fs);
     
    10611070
    10621071  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RMNOD))
    1063     printf ("rtems-rfs: rmnod: parent:%ld doff:%lu, ino:%ld\n",
     1072    printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
    10641073            parent, doff, ino);
    10651074
     
    11251134
    11261135  if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RENAME))
    1127     printf ("rtems-rfs: rename: ino:%ld doff:%lu, new parent:%ld new name:%s\n",
     1136    printf ("rtems-rfs: rename: ino:%" PRId32 " doff:%" PRIu32 ", new parent:%" PRId32 " new name:%s\n",
    11281137            ino, doff, new_parent, new_name);
    11291138
Note: See TracChangeset for help on using the changeset viewer.