summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 442baac..227bf9c 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2070,6 +2070,7 @@ H5Fcreate(const char *filename, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
H5F_t *new_file = NULL; /*file struct for new file */
hid_t ret_value; /*return value */
+ hid_t estack_id;
FUNC_ENTER_API(H5Fcreate, FAIL)
H5TRACE4("i","sIuii",filename,flags,fcpl_id,fapl_id);
@@ -2554,9 +2555,15 @@ H5F_read_superblock(H5F_t *f, hid_t dxpl_id, H5G_entry_t *root_ent, haddr_t addr
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to read file driver information")
} /* end if */
+ /* Check if driver matches family driver saved. Unfortunately, we can't push this function to
+ * each specific driver because we're checking if the driver is correct.*/
+ if(!HDstrncmp(driver_name, "NCSAfami", 8) && HDstrcmp(lf->cls->name, "family"))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "family driver should be used")
+
if (H5FD_sb_decode(lf, driver_name, p) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to decode driver information")
-
+ p += driver_size; /* advance past driver information section */
+
/* Compute driver info block checksum */
assert(sizeof(chksum) == sizeof(shared->drvr_chksum));
for (q = (uint8_t *)&chksum, chksum = 0, i = 0; i < (driver_size + 16); ++i)