summaryrefslogtreecommitdiffstats
path: root/src/H5Gdeprec.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-04 21:48:46 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2012-04-04 21:48:46 (GMT)
commitb56de62ae06434c5966fc07664c44d91b407c515 (patch)
treea75e027d145bc5a973eeca33376e98b0ca4a0c93 /src/H5Gdeprec.c
parent668df7889cdb78ddf5c05ba6846794991d1ed826 (diff)
downloadhdf5-b56de62ae06434c5966fc07664c44d91b407c515.zip
hdf5-b56de62ae06434c5966fc07664c44d91b407c515.tar.gz
hdf5-b56de62ae06434c5966fc07664c44d91b407c515.tar.bz2
[svn-r22250] - fix most of issues from code review
- object open routines fall back to the generic VL object open in case the specific call back is not impemented - H5L VOL create/copy/move routines - make VOL create routines have similar interface and stuff parameters in creation plist - some bug fixes
Diffstat (limited to 'src/H5Gdeprec.c')
-rw-r--r--src/H5Gdeprec.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 8f419b9..e5c419b 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -202,6 +202,8 @@ hid_t
H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
{
hid_t tmp_gcpl = (-1); /* Temporary group creation property list */
+ hid_t lcpl_id = H5P_LINK_CREATE_DEFAULT;
+ H5P_genplist_t *plist;
hid_t ret_value; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -213,8 +215,8 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
/* Check if we need to create a non-standard GCPL */
if(size_hint > 0) {
- H5P_genplist_t *gc_plist; /* Property list created */
H5O_ginfo_t ginfo; /* Group info property */
+ H5P_genplist_t *gc_plist; /* Property list created */
/* Get the default property list */
if(NULL == (gc_plist = (H5P_genplist_t *)H5I_object(H5P_GROUP_CREATE_DEFAULT)))
@@ -240,9 +242,16 @@ H5Gcreate1(hid_t loc_id, const char *name, size_t size_hint)
else
tmp_gcpl = H5P_GROUP_CREATE_DEFAULT;
+ /* Get the plist structure */
+ if(NULL == (plist = (H5P_genplist_t *)H5I_object(tmp_gcpl)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* get creation properties */
+ if(H5P_set(plist, H5G_CRT_LCPL_ID_NAME, &lcpl_id) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for lcpl id")
+
/* Create the group through the VOL */
- if((ret_value = H5VL_group_create(loc_id, name, H5P_LINK_CREATE_DEFAULT, tmp_gcpl,
- H5P_GROUP_ACCESS_DEFAULT)) < 0)
+ if((ret_value = H5VL_group_create(loc_id, name, tmp_gcpl, H5P_GROUP_ACCESS_DEFAULT)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group")
done: