Changeset 46c20c8 in mainline for uspace/srv/bd/file_bd/file_bd.c
- Timestamp:
- 2010-11-26T20:08:10Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 45df59a
- Parents:
- fb150d78 (diff), ffdd2b9 (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/srv/bd/file_bd/file_bd.c
rfb150d78 r46c20c8 57 57 58 58 static const size_t block_size = 512; 59 static bn_t num_blocks;59 static aoff64_t num_blocks; 60 60 static FILE *img; 61 61 62 static dev _handle_t dev_handle;62 static devmap_handle_t devmap_handle; 63 63 static fibril_mutex_t dev_lock; 64 64 … … 82 82 return -1; 83 83 84 rc = devmap_device_register(argv[2], &dev _handle);84 rc = devmap_device_register(argv[2], &devmap_handle); 85 85 if (rc != EOK) { 86 86 devmap_hangup_phone(DEVMAP_DRIVER); … … 210 210 /* Check whether access is within device address bounds. */ 211 211 if (ba + cnt > num_blocks) { 212 printf(NAME ": Accessed blocks %" PRIu BN "-%" PRIuBN", while "213 "max block number is %" PRIu BN".\n", ba, ba + cnt - 1,212 printf(NAME ": Accessed blocks %" PRIuOFF64 "-%" PRIuOFF64 ", while " 213 "max block number is %" PRIuOFF64 ".\n", ba, ba + cnt - 1, 214 214 num_blocks - 1); 215 215 return ELIMIT; … … 248 248 /* Check whether access is within device address bounds. */ 249 249 if (ba + cnt > num_blocks) { 250 printf(NAME ": Accessed blocks %" PRIu BN "-%" PRIuBN", while "251 "max block num eber is %" PRIuBN".\n", ba, ba + cnt - 1,250 printf(NAME ": Accessed blocks %" PRIuOFF64 "-%" PRIuOFF64 ", while " 251 "max block number is %" PRIuOFF64 ".\n", ba, ba + cnt - 1, 252 252 num_blocks - 1); 253 253 return ELIMIT;
Note:
See TracChangeset
for help on using the changeset viewer.