Ignore:
File:
1 edited

Legend:

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

    r5a6cc679 ra35b458  
    4949#include <inttypes.h>
    5050#include <errno.h>
     51#include <str.h>
    5152
    5253#define NAME    "blkdump"
     
    7172        aoff64_t dev_nblocks;
    7273        bool toc = false;
    73        
     74
    7475        if (argc < 2) {
    7576                printf(NAME ": Error, argument missing.\n");
     
    9091                relative = true;
    9192        }
    92        
     93
    9394        if (str_cmp(*argv, "--offset") == 0) {
    9495                --argc; ++argv;
     
    108109                --argc; ++argv;
    109110        }
    110        
     111
    111112        if (str_cmp(*argv, "--count") == 0) {
    112113                --argc; ++argv;
     
    240241        size_t pos;
    241242        uint8_t b;
    242        
     243
    243244        if (length > bytes_per_row) {
    244245                length = bytes_per_row;
    245246        }
    246        
     247
    247248        /* Print hexadecimal values */
    248249        for (pos = 0; pos < length; pos++) {
     
    252253                printf("%02hhX ", data[pos]);
    253254        }
    254        
     255
    255256        /* Pad with spaces if we have less than 16 bytes */
    256257        for (pos = length; pos < bytes_per_row; pos++) {
     
    260261                printf("   ");
    261262        }
    262        
     263
    263264        /* Print printable characters */
    264265        for (pos = 0; pos < length; pos++) {
Note: See TracChangeset for help on using the changeset viewer.