summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-05-20 21:50:20 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-05-20 21:50:20 (GMT)
commit02ca8127867a11ed57cfb8da11ab9cea6dd4b516 (patch)
treeac888aa86a1194932ae2f6931421b887e97ab81a /src/H5F.c
parent617a21dbb3a1952b0ba28d212c00295595ed7bdd (diff)
downloadhdf5-02ca8127867a11ed57cfb8da11ab9cea6dd4b516.zip
hdf5-02ca8127867a11ed57cfb8da11ab9cea6dd4b516.tar.gz
hdf5-02ca8127867a11ed57cfb8da11ab9cea6dd4b516.tar.bz2
[svn-r10778] Purpose: Bug fix
Description: Description: See details from Bug #213. Family member file size wasn't saved anywhere in file. When family file is opened, the first member size determine the member size. Solution: This is the second step of fixing this bug. Multi driver is checked against the driver name saved in superblock. Wrong driver will result in a failure with an error message indicating multi driver should be used. This change includes split driver because it's a special case for multi driver. In the first step of checkin. Family member size and name template(unused at this stage) are saved in file superblock. When file is reopened,the size passed in thrin superblock. A different size will trigger a failure with an error message indicating the right size. Wrong driver to open family file will cause a failure, too. The third step will be changing h5repart to let it change family member size in the superblock if user uses it to change member file size. Platforms tested: h5committest and fuss.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 227bf9c..6cb937d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -2555,11 +2555,13 @@ 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.*/
+ /* Check if driver matches driver information 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(!HDstrncmp(driver_name, "NCSAmult", 8) && HDstrcmp(lf->cls->name, "multi"))
+ HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "multi 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 */