Ignore:
Timestamp:
2010-02-05T10:57:50Z (14 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0358da0
Parents:
3f085132 (diff), b4cbef1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merged with head

File:
1 moved

Legend:

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

    r3f085132 r3b3e776  
    6161#include <async.h>
    6262#include <as.h>
    63 #include <fibril_sync.h>
     63#include <fibril_synch.h>
    6464#include <devmap.h>
    6565#include <sys/types.h>
     66#include <sys/typefmt.h>
     67#include <inttypes.h>
    6668#include <libblock.h>
    6769#include <devmap.h>
     
    247249                size_mb = (part->length * block_size + 1024 * 1024 - 1)
    248250                    / (1024 * 1024);
    249                 printf(NAME ": Registered device %s: %llu blocks %llu MB.\n",
    250                     name, part->length, size_mb);
     251                printf(NAME ": Registered device %s: %" PRIuBN " blocks "
     252                    "%" PRIu64 " MB.\n", name, 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        }
     
    333336                rc = block_read_direct(indev_handle, ba, 1, brb);
    334337                if (rc != EOK) {
    335                         printf(NAME ": Failed reading EBR block at %u.\n", ba);
     338                        printf(NAME ": Failed reading EBR block at %"
     339                            PRIu32 ".\n", ba);
    336340                        return rc;
    337341                }
     
    339343                sgn = uint16_t_le2host(brb->signature);
    340344                if (sgn != BR_SIGNATURE) {
    341                         printf(NAME ": Invalid boot record signature 0x%04X "
    342                             " in EBR at %u.\n", sgn, ba);
     345                        printf(NAME ": Invalid boot record signature 0x%04"
     346                            PRIX16 " in EBR at %" PRIu32 ".\n", sgn, ba);
    343347                        return EINVAL;
    344348                }
     
    463467                        ipc_answer_1(callid, EOK, block_size);
    464468                        continue;
    465 
     469                case BD_GET_NUM_BLOCKS:
     470                        ipc_answer_2(callid, EOK, LOWER32(part->length),
     471                            UPPER32(part->length));
     472                        continue;
    466473                default:
    467474                        retval = EINVAL;
Note: See TracChangeset for help on using the changeset viewer.