diff options
Diffstat (limited to 'src/H5FDmulti.c')
-rw-r--r-- | src/H5FDmulti.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c index 5751596..6e0df1b 100644 --- a/src/H5FDmulti.c +++ b/src/H5FDmulti.c @@ -123,6 +123,7 @@ static herr_t H5FD_multi_sb_encode(H5FD_t *file, char *name/*out*/, unsigned char *buf/*out*/); static herr_t H5FD_multi_sb_decode(H5FD_t *file, const char *name, const unsigned char *buf); +static htri_t H5FD_multi_sb_verify(H5FD_t *file, const char *driver_id); static void *H5FD_multi_fapl_get(H5FD_t *file); static void *H5FD_multi_fapl_copy(const void *_old_fa); static herr_t H5FD_multi_fapl_free(void *_fa); @@ -157,6 +158,7 @@ static const H5FD_class_t H5FD_multi_g = { H5FD_multi_sb_size, /*sb_size */ H5FD_multi_sb_encode, /*sb_encode */ H5FD_multi_sb_decode, /*sb_decode */ + H5FD_multi_sb_verify, /*sb_verify */ sizeof(H5FD_multi_fapl_t), /*fapl_size */ H5FD_multi_fapl_get, /*fapl_get */ H5FD_multi_fapl_copy, /*fapl_copy */ @@ -982,6 +984,34 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf) /*------------------------------------------------------------------------- + * Function: H5FD_multi_sb_verify + * + * Purpose: Verify that the multi driver is compatable with the driver + * that created the file. + * + * Return: Success: TRUE if the driver is compatible, else FALSE + * Failure: Negative + * + * Programmer: Jacob Gruber + * Friday, January 13, 2012 + * + *------------------------------------------------------------------------- + */ +static htri_t +H5FD_multi_sb_verify(H5FD_t *_file, const char *sb_driver_id) +{ + static const char *func = "H5FD_multi_sb_verify"; + + /* Check that the superblock was written by the multi driver */ + if(strncmp(sb_driver_id, "NCSAmult", (size_t)8) == 0) { + return 1; + } + + return 0; +} /* end H5FD_family_sb_verify() */ + + +/*------------------------------------------------------------------------- * Function: H5FD_multi_fapl_get * * Purpose: Returns a file access property list which indicates how the |