Changeset f544167 in rtems


Ignore:
Timestamp:
Jun 17, 2010, 3:13:32 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
d4118467
Parents:
b177ebb
Message:

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

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

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rb177ebb rf544167  
     12010-06-17      Ralf Corsépius <ralf.corsepius@rtems.org>
     2
     3        * libfs/src/rfs/rtems-rfs-shell.c: Various 64bit fixes.
     4
    152010-06-17      Chris Johns <chrisj@rtems.org>
    26
     
    7112010-06-17      Ralf Corsépius <ralf.corsepius@rtems.org>
    812
     13        * libfs/src/rfs/rtems-rfs-shell.c: Various 64bit fixes.
    914        * libfs/src/rfs/rtems-rfs-bitmaps-ut.c: Various 64bit fixes.
    1015        * libfs/src/rfs/rtems-rfs-group.c: Various 64bit fixes.
  • cpukit/libfs/src/rfs/rtems-rfs-shell.c

    rb177ebb rf544167  
    2020#endif
    2121
     22#include <inttypes.h>
    2223#include <string.h>
    2324
     
    121122
    122123  printf ("RFS Filesystem Data\n");
    123   printf ("             flags: %08lx\n", fs->flags);
     124  printf ("             flags: %08" PRIx32 "\n", fs->flags);
    124125#if 0
    125126  printf ("            device: %08lx\n", rtems_rfs_fs_device (fs));
     
    127128  printf ("            blocks: %zu\n",  rtems_rfs_fs_blocks (fs));
    128129  printf ("        block size: %zu\n",  rtems_rfs_fs_block_size (fs));
    129   printf ("              size: %llu\n", rtems_rfs_fs_size (fs));
    130   printf ("  media block size: %lu\n",  rtems_rfs_fs_media_block_size (fs));
    131   printf ("        media size: %llu\n", rtems_rfs_fs_media_size (fs));
    132   printf ("            inodes: %lu\n",  rtems_rfs_fs_inodes (fs));
    133   printf ("        bad blocks: %lu\n",  fs->bad_blocks);
    134   printf ("  max. name length: %lu\n",  rtems_rfs_fs_max_name (fs));
     130  printf ("              size: %" PRIu64 "\n", rtems_rfs_fs_size (fs));
     131  printf ("  media block size: %" PRIu32 "\n",  rtems_rfs_fs_media_block_size (fs));
     132  printf ("        media size: %" PRIu64 "\n", rtems_rfs_fs_media_size (fs));
     133  printf ("            inodes: %" PRIu32 "\n",  rtems_rfs_fs_inodes (fs));
     134  printf ("        bad blocks: %" PRIu32 "\n",  fs->bad_blocks);
     135  printf ("  max. name length: %" PRIu32 "\n",  rtems_rfs_fs_max_name (fs));
    135136  printf ("            groups: %d\n",   fs->group_count);
    136137  printf ("      group blocks: %zd\n",  fs->group_blocks);
     
    140141  printf ("     singly blocks: %zd\n",  fs->block_map_singly_blocks);
    141142  printf ("    doublly blocks: %zd\n",  fs->block_map_doubly_blocks);
    142   printf (" max. held buffers: %ld\n",  fs->max_held_buffers);
     143  printf (" max. held buffers: %" PRId32 "\n",  fs->max_held_buffers);
    143144
    144145  rtems_rfs_shell_lock_rfs (fs);
     
    183184  {
    184185    rtems_rfs_shell_unlock_rfs (fs);
    185     printf ("error: testing block state: block=%lu: (%d) %s\n",
     186    printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
    186187            block, rc, strerror (rc));
    187188    return 1;
    188189  }
    189190
    190   printf (" %5lu: block %s\n", block, state ? "allocated" : "free");
     191  printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
    191192   
    192193  rc = rtems_rfs_buffer_handle_open (fs, &buffer);
     
    194195  {
    195196    rtems_rfs_shell_unlock_rfs (fs);
    196     printf ("error: opening buffer handle: block=%lu: (%d) %s\n",
     197    printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
    197198            block, rc, strerror (rc));
    198199    return 1;
     
    204205    rtems_rfs_buffer_handle_close (fs, &buffer);
    205206    rtems_rfs_shell_unlock_rfs (fs);
    206     printf ("error: requesting buffer handle: block=%lu: (%d) %s\n",
     207    printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
    207208            block, rc, strerror (rc));
    208209    return 1;
     
    231232  {
    232233    rtems_rfs_shell_unlock_rfs (fs);
    233     printf ("error: closing buffer handle: block=%lu: (%d) %s\n",
     234    printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
    234235            block, rc, strerror (rc));
    235236    return 1;
     
    305306      (start >= total) || (end >= total))
    306307  {
    307     printf ("error: inode out of range (0->%ld).\n", total - 1);
     308    printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
    308309    return 1;
    309310  }
     
    320321    {
    321322      rtems_rfs_shell_unlock_rfs (fs);
    322       printf ("error: testing inode state: ino=%lu: (%d) %s\n",
     323      printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
    323324              ino, rc, strerror (rc));
    324325      return 1;
     
    334335      {
    335336        rtems_rfs_shell_unlock_rfs (fs);
    336         printf ("error: opening inode handle: ino=%lu: (%d) %s\n",
     337        printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
    337338                ino, rc, strerror (rc));
    338339        return 1;
     
    369370      if (!error_check_only || error)
    370371      {
    371         printf (" %5lu: pos=%06lu:%04zx %c ",
     372        printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
    372373                ino, rtems_rfs_buffer_bnum (&inode.buffer),
    373374                inode.offset * RTEMS_RFS_INODE_SIZE,
     
    390391          else if (RTEMS_RFS_S_ISLNK (mode))
    391392            type = "LNK";
    392           printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04lu b=[",
     393          printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
    393394                  rtems_rfs_inode_get_links (&inode),
    394395                  mode, type, mode & ((1 << 10) - 1),
     
    396397                  rtems_rfs_inode_get_block_count (&inode));
    397398          for (b = 0; b < (RTEMS_RFS_INODE_BLOCKS - 1); b++)
    398             printf ("%lu ", rtems_rfs_inode_get_block (&inode, b));
    399           printf ("%lu]\n", rtems_rfs_inode_get_block (&inode, b));
     399            printf ("%" PRIu32 " ", rtems_rfs_inode_get_block (&inode, b));
     400          printf ("%" PRIu32 "]\n", rtems_rfs_inode_get_block (&inode, b));
    400401        }
    401402      }
     
    405406      {
    406407        rtems_rfs_shell_unlock_rfs (fs);
    407         printf ("error: closing inode handle: ino=%lu: (%d) %s\n",
     408        printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
    408409                ino, rc, strerror (rc));
    409410        return 1;
     
    442443  {
    443444    rtems_rfs_shell_unlock_rfs (fs);
    444     printf ("error: testing block state: block=%lu: (%d) %s\n",
     445    printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
    445446            block, rc, strerror (rc));
    446447    return 1;
    447448  }
    448449
    449   printf (" %5lu: block %s\n", block, state ? "allocated" : "free");
     450  printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
    450451
    451452  rc = rtems_rfs_buffer_handle_open (fs, &buffer);
     
    453454  {
    454455    rtems_rfs_shell_unlock_rfs (fs);
    455     printf ("error: opening buffer handle: block=%lu: (%d) %s\n",
     456    printf ("error: opening buffer handle: block=%" PRIu32 ": (%d) %s\n",
    456457            block, rc, strerror (rc));
    457458    return 1;
     
    463464    rtems_rfs_buffer_handle_close (fs, &buffer);
    464465    rtems_rfs_shell_unlock_rfs (fs);
    465     printf ("error: requesting buffer handle: block=%lu: (%d) %s\n",
     466    printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
    466467            block, rc, strerror (rc));
    467468    return 1;
     
    494495    if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs)))
    495496    {
    496       printf (" %5d: entry ino appears corrupt: ino=%ld\n", entry, eino);
     497      printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
    497498      break;
    498499    }
     
    500501    length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
    501502   
    502     printf (" %5d: %04x inode=%-6lu hash=%08lx name[%03u]=",
     503    printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
    503504            entry, b,
    504505            rtems_rfs_dir_entry_ino (data),
     
    524525  {
    525526    rtems_rfs_shell_unlock_rfs (fs);
    526     printf ("error: closing buffer handle: block=%lu: (%d) %s\n",
     527    printf ("error: closing buffer handle: block=%" PRIu32 ": (%d) %s\n",
    527528            block, rc, strerror (rc));
    528529    return 1;
     
    576577    blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
    577578    inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap);
    578     printf (" %4d: base=%-7lu size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
     579    printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
    579580            g, group->base, group->size,
    580581            blocks, (blocks * 100)  / group->size,
Note: See TracChangeset for help on using the changeset viewer.