Rev 4509 | Rev 4550 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4509 | Rev 4549 | ||
---|---|---|---|
Line 472... | Line 472... | ||
472 | *bufpos += rd; |
472 | *bufpos += rd; |
473 | *pos += rd; |
473 | *pos += rd; |
474 | left -= rd; |
474 | left -= rd; |
475 | } |
475 | } |
476 | 476 | ||
477 | if (*bufpos == *buflen) { |
477 | if (*bufpos == (off_t) *buflen) { |
478 | /* Refill the communication buffer with a new block. */ |
478 | /* Refill the communication buffer with a new block. */ |
479 | ipcarg_t retval; |
479 | ipcarg_t retval; |
480 | int rc = async_req_2_1(devcon->dev_phone, BD_READ_BLOCK, |
480 | int rc = async_req_2_1(devcon->dev_phone, BD_READ_BLOCK, |
481 | *pos / block_size, block_size, &retval); |
481 | *pos / block_size, block_size, &retval); |
482 | if ((rc != EOK) || (retval != EOK)) |
482 | if ((rc != EOK) || (retval != EOK)) |
483 | return (rc != EOK ? rc : retval); |
483 | return (rc != EOK ? rc : (int) retval); |
484 | 484 | ||
485 | *bufpos = 0; |
485 | *bufpos = 0; |
486 | *buflen = block_size; |
486 | *buflen = block_size; |
487 | } |
487 | } |
488 | } |
488 | } |