summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-09-11 17:30:24 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-09-11 17:30:24 (GMT)
commit5e7ab927c6c48edf51d5e190d0f8c9ab9c151a56 (patch)
tree1cfbd1759bba28b81ad1f81246bf03a2bbb5e040 /src/H5F.c
parente5cad0ef24543e55d164a26dd42a0cc1ba5c2cbe (diff)
downloadhdf5-5e7ab927c6c48edf51d5e190d0f8c9ab9c151a56.zip
hdf5-5e7ab927c6c48edf51d5e190d0f8c9ab9c151a56.tar.gz
hdf5-5e7ab927c6c48edf51d5e190d0f8c9ab9c151a56.tar.bz2
[svn-r12656] Description:
Add "use the latest version of the file format" flag to the file access property list and internal file data structures. Fix bug where metadata block size was retrieved instead of the small data block size. Categorize property list routine prototypes in the public header file. Tested on: Mac OS/PPC 10.4 (amazon) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index 40fc45f..4e224d8 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -207,6 +207,7 @@ H5F_init_interface(void)
hsize_t family_newsize = H5F_ACS_FAMILY_NEWSIZE_DEF;
hbool_t family_to_sec2 = H5F_ACS_FAMILY_TO_SEC2_DEF;
H5FD_mem_t mem_type = H5F_ACS_MULTI_TYPE_DEF;
+ hbool_t latest_format = H5F_ACS_LATEST_FORMAT_DEF;
/* File mount property class variable.
* - Mount property class to modify
@@ -361,6 +362,10 @@ H5F_init_interface(void)
/* Register the data type of multi driver info */
if(H5P_register(acs_pclass,H5F_ACS_MULTI_TYPE_NAME,H5F_ACS_MULTI_TYPE_SIZE, &mem_type,NULL,NULL,NULL,NULL,NULL,NULL,NULL)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
+
+ /* Register the 'use the latest version of the format' flag */
+ if(H5P_register(acs_pclass,H5F_ACS_LATEST_FORMAT_NAME, H5F_ACS_LATEST_FORMAT_SIZE, &latest_format, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "can't insert property into class")
} /* end if */
/* Only register the default property list if it hasn't been created yet */
@@ -869,6 +874,8 @@ H5F_get_access_plist(H5F_t *f)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't sieve buffer size")
if(H5P_set(new_plist, H5F_ACS_SDATA_BLOCK_SIZE_NAME, &(f->shared->lf->def_sdata_block_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'small data' cache size")
+ if(H5P_set(new_plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set 'latest format' flag")
/*
* Since we're resetting the driver ID and info, close them if they
@@ -1511,6 +1518,8 @@ H5F_new(H5F_file_t *shared, hid_t fcpl_id, hid_t fapl_id, H5FD_t *lf)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get garbage collect reference")
if(H5P_get(plist, H5F_ACS_SIEVE_BUF_SIZE_NAME, &(f->shared->sieve_buf_size)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get sieve buffer size")
+ if(H5P_get(plist, H5F_ACS_LATEST_FORMAT_NAME, &(f->shared->latest_format)) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get 'latest format' flag")
/*
* Create a meta data cache with the specified number of elements.