Changeset d3842e0 in mainline
- Timestamp:
- 2011-02-12T14:52:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d5e2763
- Parents:
- cd5816d6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/blkdump/blkdump.c
rcd5816d6 rd3842e0 69 69 aoff64_t current; 70 70 aoff64_t limit; 71 bool relative = false; 71 72 72 73 if (argc < 2) { … … 78 79 --argc; ++argv; 79 80 81 if (str_cmp(*argv, "--relative") == 0) { 82 --argc; ++argv; 83 relative = true; 84 } 85 80 86 if (str_cmp(*argv, "--offset") == 0) { 81 87 --argc; ++argv; … … 166 172 167 173 for (data_offset = 0; data_offset < block_size; data_offset += 16) { 168 printf("%8" PRIxOFF64 ": ", current*block_size + data_offset); 174 if (relative) { 175 printf("%8" PRIxOFF64 ": ", (aoff64_t) data_offset); 176 } 177 else { 178 printf("%8" PRIxOFF64 ": ", current*block_size + data_offset); 179 } 169 180 print_hex_row(data+data_offset, block_size-data_offset, 16); 170 181 printf("\n"); … … 224 235 static void syntax_print(void) 225 236 { 226 printf("syntax: blkdump [-- offset <num_blocks>] [--count <num_blocks>] <device_name>\n");237 printf("syntax: blkdump [--relative] [--offset <num_blocks>] [--count <num_blocks>] <device_name>\n"); 227 238 } 228 239
Note:
See TracChangeset
for help on using the changeset viewer.