Changes in uspace/app/blkdump/blkdump.c [a35b458:5a6cc679] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/blkdump/blkdump.c
ra35b458 r5a6cc679 49 49 #include <inttypes.h> 50 50 #include <errno.h> 51 #include <str.h>52 51 53 52 #define NAME "blkdump" … … 72 71 aoff64_t dev_nblocks; 73 72 bool toc = false; 74 73 75 74 if (argc < 2) { 76 75 printf(NAME ": Error, argument missing.\n"); … … 91 90 relative = true; 92 91 } 93 92 94 93 if (str_cmp(*argv, "--offset") == 0) { 95 94 --argc; ++argv; … … 109 108 --argc; ++argv; 110 109 } 111 110 112 111 if (str_cmp(*argv, "--count") == 0) { 113 112 --argc; ++argv; … … 241 240 size_t pos; 242 241 uint8_t b; 243 242 244 243 if (length > bytes_per_row) { 245 244 length = bytes_per_row; 246 245 } 247 246 248 247 /* Print hexadecimal values */ 249 248 for (pos = 0; pos < length; pos++) { … … 253 252 printf("%02hhX ", data[pos]); 254 253 } 255 254 256 255 /* Pad with spaces if we have less than 16 bytes */ 257 256 for (pos = length; pos < bytes_per_row; pos++) { … … 261 260 printf(" "); 262 261 } 263 262 264 263 /* Print printable characters */ 265 264 for (pos = 0; pos < length; pos++) {
Note:
See TracChangeset
for help on using the changeset viewer.