Changeset 9c12bcfd in rtems
- Timestamp:
- 01/07/19 08:32:16 (5 years ago)
- Branches:
- 5, master
- Children:
- 5b951175
- Parents:
- 956d76cc
- git-author:
- Sebastian Huber <sebastian.huber@…> (01/07/19 08:32:16)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (01/07/19 08:49:16)
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libdl/rtl-mdreloc-sparc.c
r956d76cc r9c12bcfd 36 36 #include <sys/cdefs.h> 37 37 38 #include <inttypes.h> 38 39 #include <stdio.h> 39 40 … … 216 217 if (value != 0 && *where != 0) { 217 218 if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) 218 printf("rtl: reloc base_rel(%s): where=%p, *where 0x% lx, "219 "addend=0x% lx, base %p\n",219 printf("rtl: reloc base_rel(%s): where=%p, *where 0x%" PRIu32 ", " 220 "addend=0x%" PRIu32 ", base %p\n", 220 221 rtems_rtl_obj_oname (obj), 221 222 where, *where, rela->r_addend, sect->base); -
cpukit/libdl/rtl-obj.c
r956d76cc r9c12bcfd 429 429 430 430 if (rtems_rtl_trace (RTEMS_RTL_TRACE_SECTION)) 431 printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08 lx\n",431 printf ("rtl: sect: add: %-2d: %s (%zu) 0x%08" PRIu32 "\n", 432 432 section, name, size, flags); 433 433 } -
cpukit/libmisc/rtems-fdt/rtems-fdt-shell.c
r956d76cc r9c12bcfd 487 487 488 488 printf ("0x%08" PRIx32 " => (value & 0x%08" PRIx32 ") == 0x%08" PRIx32 \ 489 " for % " PRIu32 "seconds\n",489 " for %ld seconds\n", 490 490 address, mask, test, rtems_fdt_test_timeout); 491 491 … … 534 534 if (argc == 1) 535 535 { 536 printf ("timeout: % " PRIu32 "seconds\n", rtems_fdt_test_timeout);536 printf ("timeout: %ld seconds\n", rtems_fdt_test_timeout); 537 537 return 0; 538 538 } -
cpukit/libmisc/shell/main_pci.c
r956d76cc r9c12bcfd 13 13 #endif 14 14 15 #include <inttypes.h> 15 16 #include <limits.h> 16 17 #include <stdlib.h> … … 137 138 result = pci_cfg_r32(pciid, offset, &data32); 138 139 if (result == PCISTS_OK) 139 printf(" r32[0x%02x]: 0x%08lx DEC=%lu\n", offset, data32, data32); 140 printf(" r32[0x%02x]: 0x%08" PRIx32 " DEC=%" PRIu32 "\n", 141 offset, data32, data32); 140 142 break; 141 143 … … 178 180 result = pci_cfg_w32(pciid, offset, data); 179 181 if (result == PCISTS_OK) 180 printf(" w32[0x%02x]: 0x%08lx DEC=%lu\n", offset, data, data); 182 printf(" w32[0x%02x]: 0x%08" PRIx32 " DEC=%" PRIu32 "\n", 183 offset, data, data); 181 184 break; 182 185 … … 363 366 printf(" SUB VENDOR: 0x%04x\n", dev->subvendor); 364 367 printf(" SUB DEVICE: 0x%04x\n", dev->subdevice); 365 printf(" CLASS: 0x%06 lx\n", dev->classrev >> 8);366 printf(" REVISION: 0x%02 lx\n", dev->classrev & 0xff);368 printf(" CLASS: 0x%06" PRIx32 "\n", dev->classrev >> 8); 369 printf(" REVISION: 0x%02" PRIx32 "\n", dev->classrev & 0xff); 367 370 printf(" IRQ: %d\n", dev->sysirq); 368 371 … … 388 391 } 389 392 390 printf(" %s[%d]: %08lx-%08lx\n", str1, i, res->start, res->end - 1); 393 printf(" %s[%d]: %08" PRIx32 "-%08" PRIx32 "\n", 394 str1, i, res->start, res->end - 1); 391 395 } 392 396 -
cpukit/libpci/pci_bus.c
r956d76cc r9c12bcfd 27 27 #define PCIBUS_INFO 28 28 29 #include <inttypes.h> 29 30 #include <stdlib.h> 30 31 #include <stdio.h> … … 302 303 PCI_DEV_EXPAND(devinfo->pcidev)); 303 304 print_line(p, buf); 304 sprintf(buf, "PCIID 0x% lx", (uint32_t)devinfo->pcidev);305 sprintf(buf, "PCIID 0x%" PRIx16 "", devinfo->pcidev); 305 306 print_line(p, buf); 306 307 sprintf(buf, "VENDOR ID: %04x", devinfo->id.vendor); … … 312 313 sprintf(buf, "SUBDEV ID: %04x", devinfo->id.subdevice); 313 314 print_line(p, buf); 314 sprintf(buf, "CLASS: % lx", devinfo->id.class);315 sprintf(buf, "CLASS: %" PRIx32, devinfo->id.class); 315 316 print_line(p, buf); 316 317 sprintf(buf, "REVISION: %x", devinfo->rev); … … 344 345 continue; 345 346 346 sprintf(buf, " %s[%d]: %08lx-%08lx [PCIADR %lx]", 347 sprintf(buf, " %s[%d]: %08" PRIx32 "-%08" PRIx32 348 " [PCIADR %" PRIx32 "]", 347 349 str1, i, pcibusres->address, 348 350 pcibusres->address + pcibusres->size - 1, pcistart); -
cpukit/libpci/pci_cfg_print_code.c
r956d76cc r9c12bcfd 10 10 11 11 #include <rtems.h> 12 #include <inttypes.h> 12 13 #include <stdio.h> 13 14 #include <string.h> … … 50 51 printf("%s{\n", prefix); 51 52 printf("%s\t.next = NULL,\n", prefix); 52 printf("%s\t.size = 0x%08 lx,\n", prefix, res->size);53 printf("%s\t.boundary = 0x%08 lx,\n", prefix, res->boundary);53 printf("%s\t.size = 0x%08" PRIx32 ",\n", prefix, res->size); 54 printf("%s\t.boundary = 0x%08" PRIx32 ",\n", prefix, res->boundary); 54 55 printf("%s\t.flags = 0x%x,\n", prefix, res->flags); 55 56 printf("%s\t.bar = %d,\n", prefix, i); 56 printf("%s\t.start = 0x%08 lx,\n", prefix, res->start);57 printf("%s\t.end = 0x%08 lx,\n", prefix, res->end);57 printf("%s\t.start = 0x%08" PRIx32 ",\n", prefix, res->start); 58 printf("%s\t.end = 0x%08" PRIx32 ",\n", prefix, res->end); 58 59 printf("%s},\n", prefix); 59 60 } … … 89 90 printf("%s.subvendor = 0x%04x,\n", prefix, dev->subvendor); 90 91 printf("%s.subdevice = 0x%04x,\n", prefix, dev->subdevice); 91 printf("%s.classrev = 0x%08 lx,\n", prefix, dev->classrev);92 printf("%s.classrev = 0x%08" PRIx32 ",\n", prefix, dev->classrev); 92 93 printf("%s.command = 0,\n", prefix); 93 94 } -
cpukit/libpci/pci_print.c
r956d76cc r9c12bcfd 8 8 */ 9 9 10 #include <inttypes.h> 10 11 #include <stdio.h> 11 12 #include <pci.h> … … 43 44 printf("\nBus %x Slot %x function: %x [0x%x] %s\n", 44 45 PCI_DEV_EXPAND(dev), dev, str); 45 printf("\tVendor id: 0x% lx, device id: 0x%lx\n",46 printf("\tVendor id: 0x%" PRIx32 ", device id: 0x%" PRIx32 "\n", 46 47 id & 0xffff, id >> 16); 47 48 if (maxbars == 2) { 48 49 PCI_CFG_R32(dev, PCIR_PRIBUS_1, &tmp); 49 printf("\tPrimary: %lx Secondary: %lx Subordinate: %lx\n", 50 printf("\tPrimary: %" PRIx32 " Secondary: %" PRIx32 51 " Subordinate: %" PRIx32 "\n", 50 52 tmp & 0xff, (tmp >> 8) & 0xff, (tmp >> 16) & 0xff); 51 53 } … … 83 85 tmp2 = tmp2 / (1024*1024); 84 86 } 85 printf("\tBAR %d: %lx [%lu%s]\n", pos, tmp, tmp2, str); 87 printf("\tBAR %d: %" PRIx32 " [%" PRIu32 "%s]\n", 88 pos, tmp, tmp2, str); 86 89 } 87 90 } … … 106 109 } 107 110 str2 = tmp & 1 ? "ENABLED" : "DISABLED"; 108 printf("\tROM: %08 lx [%lu%s] (%s)\n",111 printf("\tROM: %08" PRIx32 " [%" PRIu32 "%s] (%s)\n", 109 112 tmp, tmp2, str, str2); 110 113 } … … 123 126 if (limit < base) 124 127 str = "DISABLED"; 125 printf("\tI/O: BASE: 0x%08 lx, LIMIT: 0x%08lx (%s)\n",126 base, limit, str);128 printf("\tI/O: BASE: 0x%08" PRIx32 ", LIMIT: 0x%08" 129 PRIx32 " (%s)\n", base, limit, str); 127 130 } 128 131 … … 134 137 if (limit < base) 135 138 str = "DISABLED"; 136 printf("\tMEMIO: BASE: 0x%08 lx, LIMIT: 0x%08lx (%s)\n",137 base, limit, str);139 printf("\tMEMIO: BASE: 0x%08" PRIx32 ", LIMIT: 0x%08" 140 PRIx32 " (%s)\n", base, limit, str); 138 141 } 139 142 … … 145 148 if (limit < base) 146 149 str = "DISABLED"; 147 printf("\tMEM: BASE: 0x%08 lx, LIMIT: 0x%08lx (%s)\n",148 150 printf("\tMEM: BASE: 0x%08" PRIx32 ", LIMIT: 0x%08" 151 PRIx32 " (%s)\n", base, limit, str); 149 152 } 150 153 } -
testsuites/fstests/fsrfsbitmap01/test.c
r956d76cc r9c12bcfd 49 49 if (rc > 0) 50 50 { 51 printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",% ld] is %s: ",51 printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ", 52 52 test, bit + count, bit, bit + size - 1, !set ? "set" : "clear"); 53 53 printf ("FAIL (%s)\n", strerror (rc)); … … 58 58 if (!result) 59 59 { 60 printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",% ld] is %s: ",60 printf (" %2d. Test bit %" PRId32 " in range (%" PRId32 ",%zu] is %s: ", 61 61 test, bit + count, bit, bit + size - 1, !set ? "set" : "clear"); 62 62 printf (" %s\n", !result ? "pass" : "FAIL"); … … 65 65 } 66 66 67 printf (" %2d. Test bit range (%" PRId32 ",% ld] all %s: pass\n",67 printf (" %2d. Test bit range (%" PRId32 ",%zu] all %s: pass\n", 68 68 test, bit, bit + size - 1, set ? "set" : "clear"); 69 69 … … 92 92 rtems_rfs_bitmap_map_clear (control, bit + i); 93 93 94 printf (" %2d. Cleared bits (%" PRId32 ", % ld] (%zd)\n",94 printf (" %2d. Cleared bits (%" PRId32 ", %zu] (%zu)\n", 95 95 test, bit, bit + size - 1, size); 96 96 … … 129 129 } 130 130 131 printf (" %2d. Alloc'ed all bits (%" PRId32 ", % ld] (%zd)\n",131 printf (" %2d. Alloc'ed all bits (%" PRId32 ", %zu] (%zu)\n", 132 132 test, bit, bit + size - 1, size); 133 133 … … 185 185 handle.bnum = 1; 186 186 187 printf ("\nRFS Bitmap Test : size = %z d (%zd)\n",187 printf ("\nRFS Bitmap Test : size = %zu (%zu)\n", 188 188 size, rtems_rfs_bitmap_elements (size)); 189 189 … … 221 221 rc = rtems_rfs_bitmap_map_alloc (&control, size - 1, &result, &bit); 222 222 result = result && (bit == (size - 1)); 223 printf (" 4. Find bit (size - 1) with seed = (size - 1) (%z d): %s (%s): bit = %" PRId32 "\n",223 printf (" 4. Find bit (size - 1) with seed = (size - 1) (%zu): %s (%s): bit = %" PRId32 "\n", 224 224 size - 1, result ? "pass" : "FAIL", strerror (rc), bit); 225 225 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); … … 234 234 235 235 rc = rtems_rfs_bitmap_map_test (&control, size - 1, &result); 236 printf (" 6. Test bit (size - 1) (%z d): %s (%s)\n",236 printf (" 6. Test bit (size - 1) (%zu): %s (%s)\n", 237 237 size - 1, result ? "pass" : "FAIL", strerror (rc)); 238 238 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); … … 285 285 286 286 rc = rtems_rfs_bitmap_map_clear (&control, size - 1); 287 printf (" 14. Clear bit (size - 1) (%z d): %s (%s)\n",287 printf (" 14. Clear bit (size - 1) (%zu): %s (%s)\n", 288 288 size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc)); 289 289 rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer); … … 301 301 rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit); 302 302 result = result && (bit == 0); 303 printf (" 17. Find bit with seed = (size / 2) (%z d): %s (%s): bit = %" PRId32 "\n",303 printf (" 17. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n", 304 304 size / 2, result ? "pass" : "FAIL", strerror (rc), bit); 305 305 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); 306 306 307 307 rc = rtems_rfs_bitmap_map_clear (&control, size - 1); 308 printf (" 18. Clear bit (size - 1) (%z d): %s, (%s)\n",308 printf (" 18. Clear bit (size - 1) (%zu): %s, (%s)\n", 309 309 size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc)); 310 310 rtems_rfs_exit_on_error (rc, false, &control, buffer.buffer); … … 312 312 rc = rtems_rfs_bitmap_map_alloc (&control, size / 2, &result, &bit); 313 313 result = result && (bit == (size - 1)); 314 printf (" 19. Find bit with seed = (size / 2) (%z d): %s (%s): bit = %" PRId32 "\n",314 printf (" 19. Find bit with seed = (size / 2) (%zu): %s (%s): bit = %" PRId32 "\n", 315 315 size / 2, result ? "pass" : "FAIL", strerror (rc), bit); 316 316 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); … … 322 322 rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit); 323 323 result = result && (bit == 0); 324 printf (" 21. Find bit with seed = ((size / 2) - 1) (%z d): %s (%s): bit = %" PRId32 "\n",324 printf (" 21. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n", 325 325 (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit); 326 326 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); 327 327 328 328 rc = rtems_rfs_bitmap_map_clear (&control, size - 1); 329 printf (" 22. Clear bit (size - 1) (%z d): %s (%s)\n",329 printf (" 22. Clear bit (size - 1) (%zu): %s (%s)\n", 330 330 size - 1, rc == 0 ? "pass" : "FAIL", strerror (rc)); 331 331 332 332 rc = rtems_rfs_bitmap_map_alloc (&control, (size / 2) - 1, &result, &bit); 333 333 result = result && (bit == (size - 1)); 334 printf (" 23. Find bit with seed = ((size / 2) - 1) (%z d): %s (%s): bit = %" PRId32 "\n",334 printf (" 23. Find bit with seed = ((size / 2) - 1) (%zu): %s (%s): bit = %" PRId32 "\n", 335 335 (size / 2) - 1, result ? "pass" : "FAIL", strerror (rc), bit); 336 336 rtems_rfs_exit_on_error (rc, !result, &control, buffer.buffer); … … 373 373 clear = rtems_rfs_bitmap_map_free (&control); 374 374 result = clear == (last_bit - first_bit); 375 printf (" 27. Check free count is %z d: %" PRId32 ": %s (%s)\n",375 printf (" 27. Check free count is %zu: %" PRId32 ": %s (%s)\n", 376 376 clear, last_bit - first_bit, 377 377 result ? "pass" : "FAIL", strerror (rc)); … … 379 379 rc = rtems_rfs_bitmap_create_search (&control); 380 380 result = clear == rtems_rfs_bitmap_map_free (&control); 381 printf (" 28. Create search check free count is %z d: %zd: %s (%s)\n",381 printf (" 28. Create search check free count is %zu: %zu: %s (%s)\n", 382 382 clear, rtems_rfs_bitmap_map_free (&control), 383 383 result ? "pass" : "FAIL", strerror (rc)); … … 455 455 printf (" Bit set value : %d\n", RTEMS_RFS_BITMAP_BIT_SET); 456 456 printf (" Bit clear value : %d\n", RTEMS_RFS_BITMAP_BIT_CLEAR); 457 printf (" Num bit per element : %z d\n", rtems_rfs_bitmap_element_bits ());457 printf (" Num bit per element : %zu\n", rtems_rfs_bitmap_element_bits ()); 458 458 459 459 #if INT_MAX >= 0x23984237
Note: See TracChangeset
for help on using the changeset viewer.