Changeset 7308e84 in mainline


Ignore:
Timestamp:
2011-03-20T15:14:31Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
04803bf, 4611094f, afe1d1e
Parents:
306061a
git-author:
Maurizio Lombardi <m.lombardi85@…> (2011-03-20 15:14:31)
git-committer:
Jiri Svoboda <jiri@…> (2011-03-20 15:14:31)
Message:

Display offset at beginning of line in bdd (thx Maurizio Lombardi).

File:
1 edited

Legend:

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

    r306061a r7308e84  
    7070        unsigned int i, j;
    7171        devmap_handle_t handle;
     72        aoff64_t offset;
    7273        uint8_t *blk;
    7374        size_t size, bytes, rows;
     
    120121        }
    121122
     123        offset = ba * block_size;
     124
    122125        while (size > 0) {
    123126                rc = block_read_direct(handle, ba, 1, blk);
     
    133136
    134137                for (j = 0; j < rows; j++) {
     138                        printf("[%06" PRIxOFF64 "] ", offset);
    135139                        for (i = 0; i < BPR; i++) {
    136140                                if (j * BPR + i < bytes)
     
    152156                                }
    153157                        }
     158                        offset += BPR;
    154159                        putchar('\n');
    155160                }
Note: See TracChangeset for help on using the changeset viewer.