Changeset 1ccafee in mainline for uspace/srv


Ignore:
Timestamp:
2010-01-27T22:22:09Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0b9ac3c, a9bbe48d
Parents:
fb6f1a5
Message:

Add type formatting macros for HelenOS system types (sys/typefmt.h) and use in appropriate places.

Location:
uspace/srv
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/part/guid_part/guid_part.c

    rfb6f1a5 r1ccafee  
    5454#include <devmap.h>
    5555#include <sys/types.h>
     56#include <sys/typefmt.h>
    5657#include <inttypes.h>
    5758#include <libblock.h>
     
    198199                    / (1024 * 1024);
    199200                printf(NAME ": Registered device %s: %" PRIu64 " blocks "
    200                     "%" PRIu64 " MB.\n", name, (uint64_t) part->length, size_mb);
     201                    "%" PRIuBN " MB.\n", name, part->length, size_mb);
    201202
    202203                part->dev = dev;
  • uspace/srv/bd/part/mbr_part/mbr_part.c

    rfb6f1a5 r1ccafee  
    6464#include <devmap.h>
    6565#include <sys/types.h>
     66#include <sys/typefmt.h>
    6667#include <inttypes.h>
    6768#include <libblock.h>
     
    248249                size_mb = (part->length * block_size + 1024 * 1024 - 1)
    249250                    / (1024 * 1024);
    250                 printf(NAME ": Registered device %s: %" PRIu64 " blocks "
    251                     "%" PRIu64 " MB.\n",
    252                     name, (uint64_t) part->length, size_mb);
     251                printf(NAME ": Registered device %s: %" PRIuBN " blocks "
     252                    "%" PRIu64 " MB.\n", name, part->length, size_mb);
    253253
    254254                part->dev = dev;
     
    336336                rc = block_read_direct(indev_handle, ba, 1, brb);
    337337                if (rc != EOK) {
    338                         printf(NAME ": Failed reading EBR block at %u.\n", ba);
     338                        printf(NAME ": Failed reading EBR block at %"
     339                            PRIu32 ".\n", ba);
    339340                        return rc;
    340341                }
  • uspace/srv/taskmon/taskmon.c

    rfb6f1a5 r1ccafee  
    3939#include <async.h>
    4040#include <ipc/services.h>
     41#include <sys/typefmt.h>
    4142#include <task.h>
    4243#include <event.h>
     
    6061        thread = IPC_GET_ARG3(*call);
    6162
    62         if (asprintf(&s_taskid, "%lld", taskid) < 0) {
     63        if (asprintf(&s_taskid, "%" PRIuTASKID, taskid) < 0) {
    6364                printf("Memory allocation failed.\n");
    6465                return;
    6566        }
    6667
    67         if (asprintf(&dump_fname, "/scratch/d%lld.txt", taskid) < 0) {
     68        if (asprintf(&dump_fname, "/scratch/d" PRIuTASKID ".txt", taskid) < 0) {
    6869                printf("Memory allocation failed.\n");
    6970                return;
    7071        }
    7172
    72         printf(NAME ": Task %lld fault in thread %p.\n", taskid, thread);
     73        printf(NAME ": Task %" PRIuTASKID " fault in thread %p.\n", taskid, thread);
    7374
    7475#ifdef CONFIG_VERBOSE_DUMPS
Note: See TracChangeset for help on using the changeset viewer.