diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-11 22:09:30 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-11 22:09:30 (GMT) |
commit | 1f15e6e9d482396e47df6785b161229e7efa1d80 (patch) | |
tree | 7c1cad2c4ca3cd80d0f84cea950e26f2aa3e91eb /src/H5VL.c | |
parent | f70f5b17403c20bef94e4c43bdf86e7fd4b88ec8 (diff) | |
download | hdf5-1f15e6e9d482396e47df6785b161229e7efa1d80.zip hdf5-1f15e6e9d482396e47df6785b161229e7efa1d80.tar.gz hdf5-1f15e6e9d482396e47df6785b161229e7efa1d80.tar.bz2 |
[svn-r22279] implement the attribute delete VOL callback
use the VOL get_space instead of the API routine in vlen_get_size
Diffstat (limited to 'src/H5VL.c')
-rw-r--r-- | src/H5VL.c | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -874,6 +874,41 @@ done: /*------------------------------------------------------------------------- + * Function: H5VL_attr_delete + * + * Purpose: Deletes an attribute through the VOL + * + * Return: Success: Non Negative + * + * Failure: Negative + * + * Programmer: Mohamad Chaarawi + * March, 2012 + * + *------------------------------------------------------------------------- + */ +herr_t +H5VL_attr_delete(hid_t loc_id, void *location, const char *attr_name) +{ + H5VL_id_wrapper_t *id_wrapper; /* user id structure */ + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(FAIL) + + /* get the ID struct */ + if(NULL == (id_wrapper = (H5VL_id_wrapper_t *)H5I_object(loc_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid user identifier") + + if((ret_value = (id_wrapper->vol_plugin->attr_cls.delete) + (id_wrapper->obj_id, location, attr_name)) < 0) + HGOTO_ERROR(H5E_VOL, H5E_CANTDELETE, FAIL, "delete failed") + +done: + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5VL_attr_close() */ + + +/*------------------------------------------------------------------------- * Function: H5VL_attr_close * * Purpose: Closes an attribute through the VOL |