Ignore:
Timestamp:
2011-06-01T08:43:42Z (14 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8d6c1f1
Parents:
9e2e715 (diff), e51a514 (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:

Huuuuuge merge from development - all the work actually :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/bdd/bdd.c

    r9e2e715 reb522e8  
    3030#include <stdlib.h>
    3131#include <str.h>
     32#include <sys/typefmt.h>
    3233#include "config.h"
    3334#include "util.h"
     
    6869        unsigned int argc;
    6970        unsigned int i, j;
    70         dev_handle_t handle;
     71        devmap_handle_t handle;
     72        aoff64_t offset;
    7173        uint8_t *blk;
    7274        size_t size, bytes, rows;
     
    119121        }
    120122
     123        offset = ba * block_size;
     124
    121125        while (size > 0) {
    122126                rc = block_read_direct(handle, ba, 1, blk);
    123127                if (rc != EOK) {
    124                         printf("%s: Error reading block %llu\n", cmdname, ba);
     128                        printf("%s: Error reading block %" PRIuOFF64 "\n", cmdname, ba);
    125129                        free(blk);
    126130                        block_fini(handle);
     
    132136
    133137                for (j = 0; j < rows; j++) {
     138                        printf("[%06" PRIxOFF64 "] ", offset);
    134139                        for (i = 0; i < BPR; i++) {
    135140                                if (j * BPR + i < bytes)
     
    151156                                }
    152157                        }
     158                        offset += BPR;
    153159                        putchar('\n');
    154160                }
Note: See TracChangeset for help on using the changeset viewer.