summaryrefslogtreecommitdiffstats
path: root/src/H5Gobj.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-04-08 21:53:31 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-04-08 21:53:31 (GMT)
commitc1c58f79a865a1e4bf53949e8819f6612c2cbd93 (patch)
tree156e27bc731b365284991ea0e3cf53a1cdf5c9d6 /src/H5Gobj.c
parent659f3a77ea0f7548ed09a9624de3fe2a183f451c (diff)
downloadhdf5-c1c58f79a865a1e4bf53949e8819f6612c2cbd93.zip
hdf5-c1c58f79a865a1e4bf53949e8819f6612c2cbd93.tar.gz
hdf5-c1c58f79a865a1e4bf53949e8819f6612c2cbd93.tar.bz2
[svn-r16710] Purpose: Fix bug 1423
Description: Versions of the library between 1.3.0 and 1.6.3 have a bug which prevents them from opening any file that does not have the root group's symbol table information cached in the root group's entry in the superblock. Prior to 1.8 this was not an issue as this information was always cached. However, 1.8.0 stopped writing this information (which is not required by the file format specification), and these older versions can therefore not read files created or last written by versions 1.8.0 to 1.8.2. This fix modifies the library to once again add this information to the superblock (when using the old file format). Tested: jam, linew, smirom (h5committest)
Diffstat (limited to 'src/H5Gobj.c')
-rw-r--r--src/H5Gobj.c109
1 files changed, 0 insertions, 109 deletions
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index 2eb1924..08a9268 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -221,115 +221,6 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5G_obj_ent_decode
- *
- * Purpose: Decodes a symbol table entry into a object location
- *
- * Return: Success: Non-negative with *pp pointing to the first byte
- * following the symbol table entry.
- *
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Sep 26 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_obj_ent_decode(H5F_t *f, const uint8_t **pp, H5O_loc_t *oloc, H5G_entry_t **entp)
-{
- const uint8_t *p_ret = *pp;
- herr_t ret_value = SUCCEED; /* Return value */
-
- FUNC_ENTER_NOAPI(H5G_obj_ent_decode, FAIL)
-
- /* check arguments */
- HDassert(f);
- HDassert(pp);
- HDassert(oloc);
-
- if(entp) {
- /* If entp is not NULL we allocate space for the symbol table entry and
- * decode the entire entry. */
- if(!(*entp)) /* Only allocate space if *entp is NULL */
- if(NULL == (*entp = (H5G_entry_t *) H5MM_calloc(sizeof(H5G_entry_t))))
- HGOTO_ERROR(H5E_RESOURCE, H5E_CANTALLOC, FAIL, "can't allocate space for symbol table entry")
- if(H5G_ent_decode_vec(f, pp, *entp, 1) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDECODE, FAIL, "can't decode symbol table entry")
-
- /* Set oloc to the correct values */
- oloc->file = (*entp)->file;
- oloc->addr = (*entp)->header;
- } else {
- /* Set file pointer for root object location */
- oloc->file = f;
-
- /* decode header */
- *pp += H5F_SIZEOF_SIZE(f); /* Skip over local heap address */
- H5F_addr_decode(f, pp, &(oloc->addr));
- *pp += 4; /* Skip over "cache type" */
- *pp += 4; /* Reserved */
- }
-
- /* Common oloc settings */
- oloc->holding_file = FALSE;
-
- /* Set decode pointer */
- *pp = p_ret + H5G_SIZEOF_ENTRY(f);
-
-done:
- FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5G_obj_ent_decode() */
-
-
-/*-------------------------------------------------------------------------
- * Function: H5G_obj_ent_encode
- *
- * Purpose: Encodes the specified object location into a symbol table
- * entry in the buffer pointed to by *pp.
- *
- * Return: Success: Non-negative, with *pp pointing to the first byte
- * after the symbol table entry.
- *
- * Failure: Negative
- *
- * Programmer: Quincey Koziol
- * koziol@ncsa.uiuc.edu
- * Sep 26 2005
- *
- *-------------------------------------------------------------------------
- */
-herr_t
-H5G_obj_ent_encode(const H5F_t *f, uint8_t **pp, const H5O_loc_t *oloc)
-{
- uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
-
- FUNC_ENTER_NOAPI_NOFUNC(H5G_obj_ent_encode)
-
- /* check arguments */
- HDassert(f);
- HDassert(pp);
-
- /* encode header */
- H5F_ENCODE_LENGTH(f, *pp, 0); /* No name for root group */
- if(oloc)
- H5F_addr_encode(f, pp, oloc->addr);
- else
- H5F_addr_encode(f, pp, HADDR_UNDEF);
- UINT32ENCODE(*pp, H5G_NOTHING_CACHED);
- UINT32ENCODE(*pp, 0); /*reserved*/
-
- /* fill with zero */
- while(*pp < p_ret)
- *(*pp)++ = 0;
- *pp = p_ret;
-
- FUNC_LEAVE_NOAPI(SUCCEED)
-} /* end H5G_obj_ent_encode() */
-
-
-/*-------------------------------------------------------------------------
* Function: H5G_obj_get_linfo
*
* Purpose: Retrieves the "link info" message for an object. Also