Changeset cd5816d6 in mainline


Ignore:
Timestamp:
2011-02-12T14:20:25Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d3842e0
Parents:
cfa73751
Message:

Fix displaying address and space delimiters in blkdump

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/blkdump/blkdump.c

    rcfa73751 rcd5816d6  
    166166               
    167167                for (data_offset = 0; data_offset < block_size; data_offset += 16) {
    168                         printf("%8" PRIxOFF64 ": ", current+data_offset);
     168                        printf("%8" PRIxOFF64 ": ", current*block_size + data_offset);
    169169                        print_hex_row(data+data_offset, block_size-data_offset, 16);
    170170                        printf("\n");
     
    193193        // Print hexadecimal values
    194194        for (pos = 0; pos < length; pos++) {
    195                 printf("%02hhX ", data[pos]);
    196195                if (pos == length/2) {
    197196                        printf(" ");
    198197                }
     198                printf("%02hhX ", data[pos]);
    199199        }
    200200       
    201201        // pad with spaces if we have less than 16 bytes
    202202        for (pos = length; pos < bytes_per_row; pos++) {
    203                 printf("   ");
    204203                if (pos == length/2) {
    205204                        printf(" ");
    206205                }
     206                printf("   ");
    207207        }
    208208       
    209209        // Print printable characters
    210210        for (pos = 0; pos < length; pos++) {
     211                if (pos == length/2) {
     212                        printf(" ");
     213                }
    211214                b = data[pos];
    212215                if (b >= 32 && b < 128) {
Note: See TracChangeset for help on using the changeset viewer.