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