Name: h5checker_obj
Signature:
ck_err_t h5checker_obj(char
*fname,, ck_addr_t obj_addr, ck_errmsg_t *buf)
Description:
h5checker_obj() validates the object header of the HDF5 file fname at obj_addr according to HDF5 File Format Specification Version 1.1, section IV Disk Format Level 2 - Data Objects. It first opens the file, then it reads and validates the superblock information. The validation of the superblock has to be all passed before proceeding with the validation of the specified object header.
All the header messages embedded in the specified object header are checked. Addresses of B-tree, object headers and local heap in some header messages of the specified object header are also followed and validated. The file fname is closed when validation is complete.
When h5checker_obj() is called with an undefined obj_addr (=CK_ADDR_UNDEF), the whole file is validated.
When non-compliant errors are found in the object header and buf is non-null,
h5checker_obj() fills in the following data structure (defined in h5check_public.h) for the errors:
#define NSLOTS 32 /* number of error records */
typedef struct ck_errmsg_t {
int nused; /* number of error records currently in use */
errmsg_t slot[NSLOTS]; /* array of error records */
} ck_errmsg_t;
typedef errmsg_t {
const char *desc; /* error message */
ck_addr_t addr; /* logical address where error occurs */
} errmsg_t;
Parameters:
char *fname IN: the name of the HDF5 file to be validated
ck_addr_t obj_addr IN: the address of the object header to be validated
ck_errmsg_t *buf OUT: buffer in which to return error information if there is error
Returns:
Returns 0 if the object header associated with fname is compliant. Information in buf is undefined if provided.
Returns a negative value if the object header associated with fname is not compliant. If buf is non-null, information about the error is filled in.