|
cbmimage
|
|
static |
check if the loop detector and the BAM are identical
| [in] | image | pointer to the image data |
|
static |
occupy the blocks for the partition table of a CMD disk
| [in] | settings | pointer to the image data |
|
static |
mark blocks as used
This function marks a block in to loop detectors.
There is a first, global loop detector. It is used to find out if files (or other link chains) "overlap" each other, that is, one link chain and another link chain end in the same blocks. Thus, it is not really a loop, but some chain error that is detected.
The second, local loop detector, is used to find out if a link chain has an intertial loop. This loop detector has to be newly initialized for each link chain.
| [in] | image | pointer to the image data |
| [in] | loop_detector | pointer to the local loop detector |
| [in] | block_start | The starting block of this chain. This data is not used internally. It is helpful in the output, telling what went wrong and where a loop was detected. |
| [in] | block_current | The current block of this chain. This block is marked as used. |
| [in] | block_target | The next block/the target of the current block in this chain. This block is set as target for the current block |
| int cbmimage_i_validate_1581_partition | ( | cbmimage_fileimage * | image, |
| cbmimage_blockaddress | block_start, | ||
| int | count ) |
check a 1581 partition
A 1581 partition is just a contiguous area of the disk, without any implied structure.
Thus, this function just marks all the blocks in the partition, nothing more.
| [in] | image | pointer to the image data |
| [in] | block_start | The starting block of this partion. From this block, the chain is followed and all blocks are marked as used. |
| [in] | count | The count of blocks that are occupied by this partition |
|
static |
follow a chain and check if it is consistent
This function follows a link chain. Doing this, it determines if there is a loop, or if this link chain shares blocks with another link chain. If any of this occurrs, this function reports an error.
| [in] | image | pointer to the image data |
| [in] | block_start | The starting block of this chain. From this block, the chain is followed and all blocks are marked as used. |
| [in,out] | count_blocks | Pointer to a variable. On return, this function will add the number of blocks it followed in the chain. Can be NULL; in this case, nothing will be returned. |
|
static |
validate the specialities of a GEOS file
This functions checks that the info block and the chains from the VLIR table (if it is a VLIR file) do not share blocks with other files or structures.
| [in] | image | pointer to the image data |
| [in] | dir_entry | The directory entry of this file |
| [in,out] | count_blocks | Pointer to a variable. On return, this function will add the number of blocks it followed in the chain. Can be NULL; in this case, nothing will be returned. |
| int cbmimage_i_validate_process_file | ( | cbmimage_fileimage * | image, |
| cbmimage_dir_entry * | dir_entry ) |
validate a specific file
| [in] | image | pointer to the image data |
| [in] | dir_entry | pointer to the directory entry of the file to validate |
|
static |
validate the side sector block of a REL file
This function checks if the link chain of a REL file is represented correctly by the side-sector block(s) of it.
Additionally, it also checks if the side-sector blocks are consistent and do not share blocks with other files or structures.
| [in] | image | pointer to the image data |
| [in] | dir_entry | The directory entry of this file |
| [in,out] | count_blocks | Pointer to a variable. On return, this function will add the number of blocks it followed in the chain. Can be NULL; in this case, nothing will be returned. |
|
static |
validate the side-sector chain
| [in] | chain_sidesector | pointer to a link chain that points to the side-sector |
| [in] | chain_file | pointer to a link chain that points to the file contents |
|
static |
check plausibility of a (non-super) side-sector
| [in] | chain_sidesector | pointer to a link chain that points to the side-sector |
| [in] | first_sidesector | pointer to a buffer that contains the data of the first side-sector in this side-sector group |
| [in] | count_sidesector | the number of this side-sector |
| [in] | recordlength |
|
static |
check if the super side-sector does not contain extra data
| [in] | chain | pointer to a link chain that points to the super side-sector |
| [in] | offset | the offset from which to check if the super side-sector is empty |
|
static |
check plausibility of a super side-sector
| [in] | chain | pointer to a link chain that points to the super side-sector |
| int cbmimage_validate | ( | cbmimage_fileimage * | image | ) |
validate the disk (and the bam)
| [in] | image | pointer to the image data |