diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-04 21:48:46 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-04 21:48:46 (GMT) |
commit | b56de62ae06434c5966fc07664c44d91b407c515 (patch) | |
tree | a75e027d145bc5a973eeca33376e98b0ca4a0c93 /src/H5G.c | |
parent | 668df7889cdb78ddf5c05ba6846794991d1ed826 (diff) | |
download | hdf5-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/H5G.c')
-rw-r--r-- | src/H5G.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -263,6 +263,7 @@ H5G_term_interface(void) hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id) { + H5P_genplist_t *plist; /* Property list pointer */ hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -293,8 +294,15 @@ H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t g if(TRUE != H5P_isa_class(gapl_id, H5P_GROUP_ACCESS)) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list") + /* Get the plist structure */ + if(NULL == (plist = (H5P_genplist_t *)H5I_object(gcpl_id))) + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + + if(H5P_set(plist, H5G_CRT_LCPL_ID_NAME, &lcpl_id) < 0) + HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set property value for lcpl id") + /* Create the group through the VOL */ - if((ret_value = H5VL_group_create(loc_id, name, lcpl_id, gcpl_id, gapl_id)) < 0) + if((ret_value = H5VL_group_create(loc_id, name, gcpl_id, gapl_id)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group") done: @@ -360,7 +368,7 @@ H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not group access property list") /* Create the group through the VOL */ - if((ret_value = H5VL_group_create(loc_id, NULL, 0, gcpl_id, gapl_id)) < 0) + if((ret_value = H5VL_group_create(loc_id, NULL, gcpl_id, gapl_id)) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group") done: |