Changeset f544167 in rtems
- Timestamp:
- Jun 17, 2010, 3:13:32 AM (9 years ago)
- Branches:
- 4.11, master
- Children:
- d4118467
- Parents:
- b177ebb
- Location:
- cpukit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
rb177ebb rf544167 1 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org> 2 3 * libfs/src/rfs/rtems-rfs-shell.c: Various 64bit fixes. 4 1 5 2010-06-17 Chris Johns <chrisj@rtems.org> 2 6 … … 7 11 2010-06-17 Ralf Corsépius <ralf.corsepius@rtems.org> 8 12 13 * libfs/src/rfs/rtems-rfs-shell.c: Various 64bit fixes. 9 14 * libfs/src/rfs/rtems-rfs-bitmaps-ut.c: Various 64bit fixes. 10 15 * libfs/src/rfs/rtems-rfs-group.c: Various 64bit fixes. -
cpukit/libfs/src/rfs/rtems-rfs-shell.c
rb177ebb rf544167 20 20 #endif 21 21 22 #include <inttypes.h> 22 23 #include <string.h> 23 24 … … 121 122 122 123 printf ("RFS Filesystem Data\n"); 123 printf (" flags: %08 lx\n", fs->flags);124 printf (" flags: %08" PRIx32 "\n", fs->flags); 124 125 #if 0 125 126 printf (" device: %08lx\n", rtems_rfs_fs_device (fs)); … … 127 128 printf (" blocks: %zu\n", rtems_rfs_fs_blocks (fs)); 128 129 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)); 135 136 printf (" groups: %d\n", fs->group_count); 136 137 printf (" group blocks: %zd\n", fs->group_blocks); … … 140 141 printf (" singly blocks: %zd\n", fs->block_map_singly_blocks); 141 142 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); 143 144 144 145 rtems_rfs_shell_lock_rfs (fs); … … 183 184 { 184 185 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", 186 187 block, rc, strerror (rc)); 187 188 return 1; 188 189 } 189 190 190 printf (" %5 lu: block %s\n", block, state ? "allocated" : "free");191 printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free"); 191 192 192 193 rc = rtems_rfs_buffer_handle_open (fs, &buffer); … … 194 195 { 195 196 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", 197 198 block, rc, strerror (rc)); 198 199 return 1; … … 204 205 rtems_rfs_buffer_handle_close (fs, &buffer); 205 206 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", 207 208 block, rc, strerror (rc)); 208 209 return 1; … … 231 232 { 232 233 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", 234 235 block, rc, strerror (rc)); 235 236 return 1; … … 305 306 (start >= total) || (end >= total)) 306 307 { 307 printf ("error: inode out of range (0->% ld).\n", total - 1);308 printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1); 308 309 return 1; 309 310 } … … 320 321 { 321 322 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", 323 324 ino, rc, strerror (rc)); 324 325 return 1; … … 334 335 { 335 336 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", 337 338 ino, rc, strerror (rc)); 338 339 return 1; … … 369 370 if (!error_check_only || error) 370 371 { 371 printf (" %5 lu: pos=%06lu:%04zx %c ",372 printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ", 372 373 ino, rtems_rfs_buffer_bnum (&inode.buffer), 373 374 inode.offset * RTEMS_RFS_INODE_SIZE, … … 390 391 else if (RTEMS_RFS_S_ISLNK (mode)) 391 392 type = "LNK"; 392 printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04 lub=[",393 printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[", 393 394 rtems_rfs_inode_get_links (&inode), 394 395 mode, type, mode & ((1 << 10) - 1), … … 396 397 rtems_rfs_inode_get_block_count (&inode)); 397 398 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)); 400 401 } 401 402 } … … 405 406 { 406 407 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", 408 409 ino, rc, strerror (rc)); 409 410 return 1; … … 442 443 { 443 444 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", 445 446 block, rc, strerror (rc)); 446 447 return 1; 447 448 } 448 449 449 printf (" %5 lu: block %s\n", block, state ? "allocated" : "free");450 printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free"); 450 451 451 452 rc = rtems_rfs_buffer_handle_open (fs, &buffer); … … 453 454 { 454 455 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", 456 457 block, rc, strerror (rc)); 457 458 return 1; … … 463 464 rtems_rfs_buffer_handle_close (fs, &buffer); 464 465 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", 466 467 block, rc, strerror (rc)); 467 468 return 1; … … 494 495 if ((eino < RTEMS_RFS_ROOT_INO) || (eino >= rtems_rfs_fs_inodes (fs))) 495 496 { 496 printf (" %5d: entry ino appears corrupt: ino=% ld\n", entry, eino);497 printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino); 497 498 break; 498 499 } … … 500 501 length = elength - RTEMS_RFS_DIR_ENTRY_SIZE; 501 502 502 printf (" %5d: %04x inode=%-6 lu hash=%08lxname[%03u]=",503 printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=", 503 504 entry, b, 504 505 rtems_rfs_dir_entry_ino (data), … … 524 525 { 525 526 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", 527 528 block, rc, strerror (rc)); 528 529 return 1; … … 576 577 blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap); 577 578 inodes = fs->group_inodes - rtems_rfs_bitmap_map_free (&group->inode_bitmap); 578 printf (" %4d: base=%-7 lusize=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",579 printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n", 579 580 g, group->base, group->size, 580 581 blocks, (blocks * 100) / group->size,
Note: See TracChangeset
for help on using the changeset viewer.