Changeset c47e1a8 in mainline for uspace/srv/bd/part/guid_part/guid_part.c
- Timestamp:
- 2010-05-21T07:50:04Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d51ee2b
- Parents:
- cf8cc36 (diff), 15b592b (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/part/guid_part/guid_part.c
rcf8cc36 rc47e1a8 79 79 bool present; 80 80 /** Address of first block */ 81 bn_t start_addr;81 aoff64_t start_addr; 82 82 /** Number of blocks */ 83 bn_t length;83 aoff64_t length; 84 84 /** Device representing the partition (outbound device) */ 85 85 dev_handle_t dev; … … 101 101 static void gpt_pte_to_part(const gpt_entry_t *pte, part_t *part); 102 102 static void gpt_connection(ipc_callid_t iid, ipc_call_t *icall); 103 static int gpt_bd_read(part_t *p, bn_t ba, size_t cnt, void *buf);104 static int gpt_bd_write(part_t *p, bn_t ba, size_t cnt, const void *buf);105 static int gpt_bsa_translate(part_t *p, bn_t ba, size_t cnt, bn_t *gba);103 static int gpt_bd_read(part_t *p, aoff64_t ba, size_t cnt, void *buf); 104 static int gpt_bd_write(part_t *p, aoff64_t ba, size_t cnt, const void *buf); 105 static int gpt_bsa_translate(part_t *p, aoff64_t ba, size_t cnt, aoff64_t *gba); 106 106 107 107 int main(int argc, char **argv) … … 199 199 / (1024 * 1024); 200 200 printf(NAME ": Registered device %s: %" PRIu64 " blocks " 201 "%" PRIu BN" MB.\n", name, part->length, size_mb);201 "%" PRIuOFF64 " MB.\n", name, part->length, size_mb); 202 202 203 203 part->dev = dev; … … 319 319 int flags; 320 320 int retval; 321 bn_t ba;321 aoff64_t ba; 322 322 size_t cnt; 323 323 part_t *part; … … 402 402 403 403 /** Read blocks from partition. */ 404 static int gpt_bd_read(part_t *p, bn_t ba, size_t cnt, void *buf)405 { 406 bn_t gba;404 static int gpt_bd_read(part_t *p, aoff64_t ba, size_t cnt, void *buf) 405 { 406 aoff64_t gba; 407 407 408 408 if (gpt_bsa_translate(p, ba, cnt, &gba) != EOK) … … 413 413 414 414 /** Write blocks to partition. */ 415 static int gpt_bd_write(part_t *p, bn_t ba, size_t cnt, const void *buf)416 { 417 bn_t gba;415 static int gpt_bd_write(part_t *p, aoff64_t ba, size_t cnt, const void *buf) 416 { 417 aoff64_t gba; 418 418 419 419 if (gpt_bsa_translate(p, ba, cnt, &gba) != EOK) … … 424 424 425 425 /** Translate block segment address with range checking. */ 426 static int gpt_bsa_translate(part_t *p, bn_t ba, size_t cnt, bn_t *gba)426 static int gpt_bsa_translate(part_t *p, aoff64_t ba, size_t cnt, aoff64_t *gba) 427 427 { 428 428 if (ba + cnt > p->length)
Note:
See TracChangeset
for help on using the changeset viewer.