Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2010-01-27T21:44:52Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
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.

File:
1 edited

Legend:

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

    rb79d450 rfb6f1a5  
    6464#include <devmap.h>
    6565#include <sys/types.h>
     66#include <inttypes.h>
    6667#include <libblock.h>
    6768#include <devmap.h>
     
    247248                size_mb = (part->length * block_size + 1024 * 1024 - 1)
    248249                    / (1024 * 1024);
    249                 printf(NAME ": Registered device %s: %llu blocks %llu MB.\n",
    250                     name, part->length, size_mb);
     250                printf(NAME ": Registered device %s: %" PRIu64 " blocks "
     251                    "%" PRIu64 " MB.\n",
     252                    name, (uint64_t) part->length, size_mb);
    251253
    252254                part->dev = dev;
     
    274276        if (brb == NULL) {
    275277                printf(NAME ": Failed allocating memory.\n");
    276                 return ENOMEM; 
     278                return ENOMEM;
    277279        }
    278280
     
    289291        sgn = uint16_t_le2host(brb->signature);
    290292        if (sgn != BR_SIGNATURE) {
    291                 printf(NAME ": Invalid boot record signature 0x%04X.\n", sgn);
     293                printf(NAME ": Invalid boot record signature 0x%04" PRIX16
     294                    ".\n", sgn);
    292295                return EINVAL;
    293296        }
     
    339342                sgn = uint16_t_le2host(brb->signature);
    340343                if (sgn != BR_SIGNATURE) {
    341                         printf(NAME ": Invalid boot record signature 0x%04X "
    342                             " in EBR at %u.\n", sgn, ba);
     344                        printf(NAME ": Invalid boot record signature 0x%04"
     345                            PRIX16 " in EBR at %" PRIu32 ".\n", sgn, ba);
    343346                        return EINVAL;
    344347                }
Note: See TracChangeset for help on using the changeset viewer.