Changeset cd5816d6 in mainline for uspace/app/blkdump/blkdump.c
- Timestamp:
- 2011-02-12T14:20:25Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3842e0
- Parents:
- cfa73751
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/blkdump/blkdump.c
rcfa73751 rcd5816d6 166 166 167 167 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); 169 169 print_hex_row(data+data_offset, block_size-data_offset, 16); 170 170 printf("\n"); … … 193 193 // Print hexadecimal values 194 194 for (pos = 0; pos < length; pos++) { 195 printf("%02hhX ", data[pos]);196 195 if (pos == length/2) { 197 196 printf(" "); 198 197 } 198 printf("%02hhX ", data[pos]); 199 199 } 200 200 201 201 // pad with spaces if we have less than 16 bytes 202 202 for (pos = length; pos < bytes_per_row; pos++) { 203 printf(" ");204 203 if (pos == length/2) { 205 204 printf(" "); 206 205 } 206 printf(" "); 207 207 } 208 208 209 209 // Print printable characters 210 210 for (pos = 0; pos < length; pos++) { 211 if (pos == length/2) { 212 printf(" "); 213 } 211 214 b = data[pos]; 212 215 if (b >= 32 && b < 128) {
Note:
See TracChangeset
for help on using the changeset viewer.