summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-05-01 21:00:52 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-05-01 21:00:52 (GMT)
commit2757f75317a07422c9a1d0378f969c3eb802c3a0 (patch)
tree6374d38220529efef51cbeead15f906e1782ebbd /src/H5D.c
parent4e243fd5e741fbdeaf92a484d52dbae4b0008268 (diff)
downloadhdf5-2757f75317a07422c9a1d0378f969c3eb802c3a0.zip
hdf5-2757f75317a07422c9a1d0378f969c3eb802c3a0.tar.gz
hdf5-2757f75317a07422c9a1d0378f969c3eb802c3a0.tar.bz2
[svn-r13721] Description:
Add "fail if unknown" and "mark if unknown" flags to object header messages. This gives the library a clean way to tell older libraries that a message should not be just ignored if it's unknown, but that other actions should occur. Tested on: Mac OS X/32 10.4.9 (amazon) FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 0677784..776a2ae 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -1228,11 +1228,26 @@ H5D_update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to update layout")
#ifdef H5O_ENABLE_BOGUS
- /*
- * Add a "bogus" message (for error testing).
- */
- if(H5O_bogus_oh(file, dxpl_id, oh)) < 0)
- HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to update 'bogus' message")
+{
+ H5P_genplist_t *dc_plist; /* Dataset's creation property list */
+
+ /* Get dataset's property list object */
+ if(NULL == (dc_plist = H5I_object(dset->shared->dcpl_id)))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
+
+ /* Check whether to add a "bogus" message */
+ if(H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) {
+ uint8_t bogus_flags = 0; /* Flags for creating "bogus" message */
+
+ /* Retrieve "bogus" message flags */
+ if(H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options")
+
+ /* Add a "bogus" message (for error testing). */
+ if(H5O_bogus_oh(file, dxpl_id, oh, (unsigned)bogus_flags) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message")
+ } /* end if */
+}
#endif /* H5O_ENABLE_BOGUS */
/* Add a modification time message. */