Changeset fb6f1a5 in mainline for uspace/app


Ignore:
Timestamp:
2010-01-27T21:44:52Z (16 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ccafee
Parents:
b79d450
Message:

Implement some of C99 inttypes.h header (formatting macros for stdint.h). Use in appropriate places. Also replace use of 0x%lx with %p.

Location:
uspace/app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkfat/mkfat.c

    rb79d450 rfb6f1a5  
    4444#include <devmap.h>
    4545#include <byteorder.h>
     46#include <sys/types.h>
     47#include <inttypes.h>
    4648#include <errno.h>
    4749#include "fat.h"
     
    157159                printf(NAME ": Warning, failed to obtain block device size.\n");
    158160        } else {
    159                 printf(NAME ": Block device has %llu blocks.\n", dev_nblocks);
     161                printf(NAME ": Block device has %" PRIu64 " blocks.\n",
     162                    (uint64_t) dev_nblocks);
    160163                cfg.total_sectors = dev_nblocks;
    161164        }
  • uspace/app/taskdump/taskdump.c

    rb79d450 rfb6f1a5  
    245245        printf("Threads:\n");
    246246        for (i = 0; i < n_threads; i++) {
    247                 printf(" [%d] hash: 0x%lx\n", 1+i, thash_buf[i]);
     247                printf(" [%d] hash: %p\n", 1+i, thash_buf[i]);
    248248
    249249                thread_dump(thash_buf[i]);
     
    289289        printf("Address space areas:\n");
    290290        for (i = 0; i < n_areas; i++) {
    291                 printf(" [%d] flags: %c%c%c%c base: 0x%lx size: 0x%lx\n", 1+i,
     291                printf(" [%d] flags: %c%c%c%c base: %p size: %p\n", 1+i,
    292292                    (ainfo_buf[i].flags & AS_AREA_READ) ? 'R' : '-',
    293293                    (ainfo_buf[i].flags & AS_AREA_WRITE) ? 'W' : '-',
     
    328328
    329329        sym_pc = fmt_sym_address(pc);
    330         printf("Thread 0x%lx crashed at %s. FP = 0x%lx\n", thash, sym_pc, fp);
     330        printf("Thread %p crashed at %s. FP = %p\n", thash, sym_pc, fp);
    331331        free(sym_pc);
    332332
  • uspace/app/trace/ipcp.c

    rb79d450 rfb6f1a5  
    279279
    280280        if ((display_mask & DM_IPC) != 0) {
    281                 printf("Response to 0x%lx: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
     281                printf("Response to %p: retval=%ld, args = (%lu, %lu, %lu, %lu, %lu)\n",
    282282                        hash, retval, IPC_GET_ARG1(*answer),
    283283                        IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
     
    336336                /* Not a response */
    337337                if ((display_mask & DM_IPC) != 0) {
    338                         printf("Not a response (hash 0x%lx)\n", hash);
     338                        printf("Not a response (hash %p)\n", hash);
    339339                }
    340340                return;
  • uspace/app/trace/trace.c

    rb79d450 rfb6f1a5  
    198198        printf("Threads:");
    199199        for (i = 0; i < n_threads; i++) {
    200                 printf(" [%d] (hash 0x%lx)", 1+i, thread_hash_buf[i]);
     200                printf(" [%d] (hash %p)", 1+i, thread_hash_buf[i]);
    201201        }
    202202        printf("\ntotal of %u threads\n", tb_needed / sizeof(uintptr_t));
     
    222222        case V_HASH:
    223223        case V_PTR:
    224                 printf("0x%08lx", val);
     224                printf("%p", val);
    225225                break;
    226226
     
    508508        }
    509509
    510         printf("Start tracing thread [%d] (hash 0x%lx).\n", thread_id, thread_hash);
     510        printf("Start tracing thread [%d] (hash %p).\n", thread_id, thread_hash);
    511511
    512512        while (!abort_trace) {
     
    552552                                break;
    553553                        case UDEBUG_EVENT_THREAD_E:
    554                                 printf("Thread 0x%lx exited.\n", val0);
     554                                printf("Thread %p exited.\n", val0);
    555555                                fibril_mutex_lock(&state_lock);
    556556                                abort_trace = true;
Note: See TracChangeset for help on using the changeset viewer.