|
cbmimage
|
Classes | |
| struct | cbmimage_blockaccessor_s |
| cbmimage block accessor data structure More... | |
Typedefs | |
| typedef struct cbmimage_blockaccessor_s | cbmimage_blockaccessor |
| cbmimage block accessor data structure | |
Functions | |
| cbmimage_blockaccessor * | cbmimage_blockaccessor_create (cbmimage_fileimage *image, cbmimage_blockaddress block) |
| create a block accessor for a specific block | |
| cbmimage_blockaccessor * | cbmimage_blockaccessor_create_from_ts (cbmimage_fileimage *image, uint8_t track, uint8_t sector) |
| create a block accessor for a specific T/S | |
| cbmimage_blockaccessor * | cbmimage_blockaccessor_create_from_lba (cbmimage_fileimage *image, uint16_t lba) |
| create a block accessor for a specific LBA | |
| void | cbmimage_blockaccessor_close (cbmimage_blockaccessor *accessor) |
| close a block accessor, freeing its resources | |
| int | cbmimage_blockaccessor_set_to (cbmimage_blockaccessor *accessor, cbmimage_blockaddress block) |
| set a block accessor for a specific block | |
| int | cbmimage_blockaccessor_set_to_ts (cbmimage_blockaccessor *accessor, uint8_t track, uint8_t sector) |
| set a block accessor for a specific T/S | |
| int | cbmimage_blockaccessor_set_to_lba (cbmimage_blockaccessor *accessor, uint16_t lba) |
| set a block accessor for a specific LBA | |
| int | cbmimage_blockaccessor_advance (cbmimage_blockaccessor *accessor) |
| advance a block accessor to the next block | |
| int | cbmimage_blockaccessor_get_next_block (cbmimage_blockaccessor *accessor, cbmimage_blockaddress *block_next) |
| get the next block of this accessor if we follow the chain | |
| int | cbmimage_blockaccessor_follow (cbmimage_blockaccessor *accessor) |
| follow the block chain of a block accessor to the next block | |
| int | cbmimage_i_blockaccessor_release (cbmimage_blockaccessor *accessor) |
| typedef struct cbmimage_blockaccessor_s cbmimage_blockaccessor |
cbmimage block accessor data structure
In order to access blocks, this data structure can be used. For small images, it gives back pointers to the in-memory copy of a block.
For bigger images, it accesses the on-disk image and gives a copy of it somewhere in memory.
| int cbmimage_blockaccessor_advance | ( | cbmimage_blockaccessor * | accessor | ) |
advance a block accessor to the next block
| [in] | accessor | pointer to the block accessor |
| void cbmimage_blockaccessor_close | ( | cbmimage_blockaccessor * | accessor | ) |
close a block accessor, freeing its resources
| [in] | accessor | pointer to the block accessor |
| cbmimage_blockaccessor * cbmimage_blockaccessor_create | ( | cbmimage_fileimage * | image, |
| cbmimage_blockaddress | block ) |
create a block accessor for a specific block
| [in] | image | pointer to the image data |
| [in] | block | the block address which we want to access |
| cbmimage_blockaccessor * cbmimage_blockaccessor_create_from_lba | ( | cbmimage_fileimage * | image, |
| uint16_t | lba ) |
create a block accessor for a specific LBA
| [in] | image | pointer to the image data |
| [in] | lba | the LBA of the block which we want to access |
| cbmimage_blockaccessor * cbmimage_blockaccessor_create_from_ts | ( | cbmimage_fileimage * | image, |
| uint8_t | track, | ||
| uint8_t | sector ) |
create a block accessor for a specific T/S
| [in] | image | pointer to the image data |
| [in] | track | the track of the block which we want to access |
| [in] | sector | the sector of the block which we want to access |
| int cbmimage_blockaccessor_follow | ( | cbmimage_blockaccessor * | accessor | ) |
follow the block chain of a block accessor to the next block
| [in] | accessor | pointer to the block accessor |
| int cbmimage_blockaccessor_get_next_block | ( | cbmimage_blockaccessor * | accessor, |
| cbmimage_blockaddress * | block_next ) |
get the next block of this accessor if we follow the chain
| [in] | accessor | pointer to the block accessor |
| [in,out] | block_next | pointer to a valid block address. On termination, it will contain the next block address. |
| int cbmimage_blockaccessor_set_to | ( | cbmimage_blockaccessor * | accessor, |
| cbmimage_blockaddress | block ) |
set a block accessor for a specific block
| [in] | accessor | pointer to the block accessor |
| [in] | block | the block address which we want to access |
| int cbmimage_blockaccessor_set_to_lba | ( | cbmimage_blockaccessor * | accessor, |
| uint16_t | lba ) |
set a block accessor for a specific LBA
| [in] | accessor | pointer to the block accessor |
| [in] | lba | the LBA of the block which we want to access |
| int cbmimage_blockaccessor_set_to_ts | ( | cbmimage_blockaccessor * | accessor, |
| uint8_t | track, | ||
| uint8_t | sector ) |
set a block accessor for a specific T/S
| [in] | accessor | pointer to the block accessor |
| [in] | track | the track of the block which we want to access |
| [in] | sector | the sector of the block which we want to access |
| int cbmimage_i_blockaccessor_release | ( | cbmimage_blockaccessor * | accessor | ) |
release a block accessor, allowing to re-use it or to close it
| [in] | accessor | pointer to the block accessor |