Changes in uspace/lib/block/block.c [cde999a:7354b5e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/block.c
rcde999a r7354b5e 49 49 #include <macros.h> 50 50 #include <mem.h> 51 #include < stdlib.h>51 #include <malloc.h> 52 52 #include <stdio.h> 53 53 #include <stacktrace.h> 54 #include <str_error.h>55 54 #include <offset.h> 56 55 #include <inttypes.h> … … 381 380 * device. 382 381 * 383 * @return EOK on success or a nerror code.382 * @return EOK on success or a negative error code. 384 383 */ 385 384 int block_get(block_t **block, service_id_t service_id, aoff64_t ba, int flags) … … 578 577 * @param block Block of which a reference is to be released. 579 578 * 580 * @return EOK on success or a nerror code.579 * @return EOK on success or a negative error code. 581 580 */ 582 581 int block_put(block_t *block) … … 699 698 * @param block_size Block size to be used for the transfer. 700 699 * 701 * @return EOK on success or a n errorcode on failure.700 * @return EOK on success or a negative return code on failure. 702 701 */ 703 702 int block_seqread(service_id_t service_id, void *buf, size_t *bufpos, … … 758 757 * @param src Buffer for storing the data. 759 758 * 760 * @return EOK on success or anerror code on failure.759 * @return EOK on success or negative error code on failure. 761 760 */ 762 761 int block_read_direct(service_id_t service_id, aoff64_t ba, size_t cnt, void *buf) … … 777 776 * @param src The data to be written. 778 777 * 779 * @return EOK on success or anerror code on failure.778 * @return EOK on success or negative error code on failure. 780 779 */ 781 780 int block_write_direct(service_id_t service_id, aoff64_t ba, size_t cnt, … … 796 795 * @param cnt Number of blocks. 797 796 * 798 * @return EOK on success or anerror code on failure.797 * @return EOK on success or negative error code on failure. 799 798 */ 800 799 int block_sync_cache(service_id_t service_id, aoff64_t ba, size_t cnt) … … 813 812 * @param bsize Output block size. 814 813 * 815 * @return EOK on success or anerror code on failure.814 * @return EOK on success or negative error code on failure. 816 815 */ 817 816 int block_get_bsize(service_id_t service_id, size_t *bsize) … … 830 829 * @param nblocks Output number of blocks. 831 830 * 832 * @return EOK on success or anerror code on failure.831 * @return EOK on success or negative error code on failure. 833 832 */ 834 833 int block_get_nblocks(service_id_t service_id, aoff64_t *nblocks) … … 847 846 * @param data Buffer that receives the data 848 847 * 849 * @return EOK on success or anerror code on failure.848 * @return EOK on success or negative error code on failure. 850 849 */ 851 850 int block_read_bytes_direct(service_id_t service_id, aoff64_t abs_offset, … … 898 897 * 899 898 * @return Allocated TOC structure. 900 * @return EOK on success or anerror code.899 * @return EOK on success or negative error code. 901 900 * 902 901 */ … … 917 916 * @param src Buffer for storing the data. 918 917 * 919 * @return EOK on success or anerror code on failure.918 * @return EOK on success or negative error code on failure. 920 919 */ 921 920 static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *buf, … … 926 925 int rc = bd_read_blocks(devcon->bd, ba, cnt, buf, size); 927 926 if (rc != EOK) { 928 printf("Error % sreading %zu blocks starting at block %" PRIuOFF64929 " from device handle %" PRIun "\n", str_error_name(rc), cnt, ba,927 printf("Error %d reading %zu blocks starting at block %" PRIuOFF64 928 " from device handle %" PRIun "\n", rc, cnt, ba, 930 929 devcon->service_id); 931 930 #ifndef NDEBUG … … 944 943 * @param src Buffer containing the data to write. 945 944 * 946 * @return EOK on success or anerror code on failure.945 * @return EOK on success or negative error code on failure. 947 946 */ 948 947 static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt, void *data, … … 953 952 int rc = bd_write_blocks(devcon->bd, ba, cnt, data, size); 954 953 if (rc != EOK) { 955 printf("Error % swriting %zu blocks starting at block %" PRIuOFF64956 " to device handle %" PRIun "\n", str_error_name(rc), cnt, ba, devcon->service_id);954 printf("Error %d writing %zu blocks starting at block %" PRIuOFF64 955 " to device handle %" PRIun "\n", rc, cnt, ba, devcon->service_id); 957 956 #ifndef NDEBUG 958 957 stacktrace_print();
Note:
See TracChangeset
for help on using the changeset viewer.