diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-07-19 14:35:57 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-07-19 14:35:57 (GMT) |
commit | fa26b8242da4119a4dc855313656a09e217ee0b0 (patch) | |
tree | e1bfbcf243b6dc8561d779655aba5eede2335487 /src/H5VLiod_obj.c | |
parent | b4a058e95b996202457204c75a34b19aab5c6d76 (diff) | |
download | hdf5-fa26b8242da4119a4dc855313656a09e217ee0b0.zip hdf5-fa26b8242da4119a4dc855313656a09e217ee0b0.tar.gz hdf5-fa26b8242da4119a4dc855313656a09e217ee0b0.tar.bz2 |
[svn-r23920] - update Soft links implementation.
- more refinements
- fix bugs in some IOD calls.
Diffstat (limited to 'src/H5VLiod_obj.c')
-rw-r--r-- | src/H5VLiod_obj.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/H5VLiod_obj.c b/src/H5VLiod_obj.c index 708fde6..c59a5ad 100644 --- a/src/H5VLiod_obj.c +++ b/src/H5VLiod_obj.c @@ -97,11 +97,11 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, /* MSC - NEED IOD */ #if 0 - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_OBJECT_TYPE, "object_type", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE, NULL, NULL, &output.obj_type) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, "link_count", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_LINK_COUNT, H5VL_IOD_KEY_OBJ_LINK_COUNT, NULL, NULL, &output.link_count) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); @@ -109,20 +109,20 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, case H5I_MAP: break; case H5I_GROUP: - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, "create_plist", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.cpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl"); break; case H5I_DATASET: - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, "create_plist", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.cpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, "datatype", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE, NULL, NULL, &output.type_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, "dataspace", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE, NULL, NULL, &output.space_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace"); break; @@ -134,7 +134,7 @@ H5VL_iod_server_object_open_cb(AXE_engine_t UNUSED axe_engine, iod_blob_iodesc_t file_desc; /* file descriptor used to write */ /* retrieve blob size metadata from scratch pad */ - if(iod_kv_get_value(mdkv_oh, IOD_TID_UNKNOWN, "size", &buf_size, + if(iod_kv_get_value(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_DTYPE_SIZE, &buf_size, sizeof(iod_size_t), NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "datatype size lookup failed"); @@ -317,7 +317,7 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, if (iod_obj_open_write(coh, sp.mdkv_id, NULL /*hints*/, &mdkv_oh, NULL) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "can't open scratch pad"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_OBJECT_TYPE, "object_type", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_OBJECT_TYPE, H5VL_IOD_KEY_OBJ_TYPE, NULL, NULL, &obj_type) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve link count"); @@ -325,20 +325,20 @@ H5VL_iod_server_object_copy_cb(AXE_engine_t UNUSED axe_engine, case H5I_MAP: break; case H5I_GROUP: - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, "create_plist", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.cpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl"); break; case H5I_DATASET: - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, "create_plist", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_PLIST, H5VL_IOD_KEY_OBJ_CPL, NULL, NULL, &output.cpl_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dcpl"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, "datatype", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATATYPE, H5VL_IOD_KEY_OBJ_DATATYPE, NULL, NULL, &output.type_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve datatype"); - if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, "dataspace", + if(H5VL_iod_get_metadata(mdkv_oh, IOD_TID_UNKNOWN, H5VL_IOD_DATASPACE, H5VL_IOD_KEY_OBJ_DATASPACE, NULL, NULL, &output.space_id) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "failed to retrieve dataspace"); break; @@ -596,7 +596,7 @@ H5VL_iod_server_object_set_comment_cb(AXE_engine_t UNUSED axe_engine, iod_kv_t kv; char *key = NULL; - key = strdup("comment"); + key = strdup(H5VL_IOD_KEY_OBJ_COMMENT); kv.key = key; kv.value_len = strlen(comment) + 1; kv.value = &comment; @@ -711,14 +711,14 @@ H5VL_iod_server_object_get_comment_cb(AXE_engine_t UNUSED axe_engine, /* MSC - NEED IOD */ #if 0 - if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, "comment", NULL, + if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_OBJ_COMMENT, NULL, &size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "lookup failed"); if(NULL == (value = malloc (size))) HGOTO_ERROR(H5E_SYM, H5E_NOSPACE, FAIL, "can't allocate value buffer"); - if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, "comment", value, + if(iod_kv_get_value(oh, IOD_TID_UNKNOWN, H5VL_IOD_KEY_OBJ_COMMENT, value, &size, NULL, NULL) < 0) HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "lookup failed"); |