Changes in uspace/app/bdsh/cmds/modules/bdd/bdd.c [7308e84:19f857a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/bdd/bdd.c
r7308e84 r19f857a 30 30 #include <stdlib.h> 31 31 #include <str.h> 32 #include <sys/typefmt.h>33 32 #include "config.h" 34 33 #include "util.h" … … 69 68 unsigned int argc; 70 69 unsigned int i, j; 71 devmap_handle_t handle; 72 aoff64_t offset; 70 dev_handle_t handle; 73 71 uint8_t *blk; 74 72 size_t size, bytes, rows; … … 121 119 } 122 120 123 offset = ba * block_size;124 125 121 while (size > 0) { 126 122 rc = block_read_direct(handle, ba, 1, blk); 127 123 if (rc != EOK) { 128 printf("%s: Error reading block % " PRIuOFF64 "\n", cmdname, ba);124 printf("%s: Error reading block %llu\n", cmdname, ba); 129 125 free(blk); 130 126 block_fini(handle); … … 136 132 137 133 for (j = 0; j < rows; j++) { 138 printf("[%06" PRIxOFF64 "] ", offset);139 134 for (i = 0; i < BPR; i++) { 140 135 if (j * BPR + i < bytes) … … 156 151 } 157 152 } 158 offset += BPR;159 153 putchar('\n'); 160 154 }
Note:
See TracChangeset
for help on using the changeset viewer.