Changeset b5e68c8 in mainline for uspace/app/bdsh/cmds/modules/bdd/bdd.c
- Timestamp:
- 2011-05-12T16:49:44Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f36787d7
- Parents:
- e80329d6 (diff), 750636a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/bdd/bdd.c
re80329d6 rb5e68c8 30 30 #include <stdlib.h> 31 31 #include <str.h> 32 #include <sys/typefmt.h> 32 33 #include "config.h" 33 34 #include "util.h" … … 68 69 unsigned int argc; 69 70 unsigned int i, j; 70 dev_handle_t handle; 71 devmap_handle_t handle; 72 aoff64_t offset; 71 73 uint8_t *blk; 72 74 size_t size, bytes, rows; … … 119 121 } 120 122 123 offset = ba * block_size; 124 121 125 while (size > 0) { 122 126 rc = block_read_direct(handle, ba, 1, blk); 123 127 if (rc != EOK) { 124 printf("%s: Error reading block % llu\n", cmdname, ba);128 printf("%s: Error reading block %" PRIuOFF64 "\n", cmdname, ba); 125 129 free(blk); 126 130 block_fini(handle); … … 132 136 133 137 for (j = 0; j < rows; j++) { 138 printf("[%06" PRIxOFF64 "] ", offset); 134 139 for (i = 0; i < BPR; i++) { 135 140 if (j * BPR + i < bytes) … … 151 156 } 152 157 } 158 offset += BPR; 153 159 putchar('\n'); 154 160 }
Note:
See TracChangeset
for help on using the changeset viewer.