Changeset a35b458 in mainline for uspace/app/blkdump/blkdump.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/blkdump/blkdump.c
r3061bc1 ra35b458 72 72 aoff64_t dev_nblocks; 73 73 bool toc = false; 74 74 75 75 if (argc < 2) { 76 76 printf(NAME ": Error, argument missing.\n"); … … 91 91 relative = true; 92 92 } 93 93 94 94 if (str_cmp(*argv, "--offset") == 0) { 95 95 --argc; ++argv; … … 109 109 --argc; ++argv; 110 110 } 111 111 112 112 if (str_cmp(*argv, "--count") == 0) { 113 113 --argc; ++argv; … … 241 241 size_t pos; 242 242 uint8_t b; 243 243 244 244 if (length > bytes_per_row) { 245 245 length = bytes_per_row; 246 246 } 247 247 248 248 /* Print hexadecimal values */ 249 249 for (pos = 0; pos < length; pos++) { … … 253 253 printf("%02hhX ", data[pos]); 254 254 } 255 255 256 256 /* Pad with spaces if we have less than 16 bytes */ 257 257 for (pos = length; pos < bytes_per_row; pos++) { … … 261 261 printf(" "); 262 262 } 263 263 264 264 /* Print printable characters */ 265 265 for (pos = 0; pos < length; pos++) {
Note:
See TracChangeset
for help on using the changeset viewer.