Changeset c4aa9cf in mainline for uspace/lib/block/libblock.c
- Timestamp:
- 2011-05-31T20:33:49Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e2fe66
- Parents:
- f6fece9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/block/libblock.c
rf6fece9 rc4aa9cf 854 854 } 855 855 856 / / calculate data position and required space856 /* calculate data position and required space */ 857 857 first_block = abs_offset / phys_block_size; 858 858 offset = abs_offset % phys_block_size; … … 861 861 buf_size = blocks * phys_block_size; 862 862 863 / / read the data into memory863 /* read the data into memory */ 864 864 buffer = malloc(buf_size); 865 865 if (buffer == NULL) { … … 873 873 } 874 874 875 / / copy the data from the buffer875 /* copy the data from the buffer */ 876 876 memcpy(data, buffer + offset, bytes); 877 877 free(buffer);
Note:
See TracChangeset
for help on using the changeset viewer.