summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-04-14 22:21:54 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-04-14 22:21:54 (GMT)
commit2521c4084c06f078846fe06bb1d3cd7bfa506316 (patch)
tree466b9213c163d812778434bba2097705b423e799 /src/H5G.c
parent3468ff3a5c4f6c384801edef9ae52ecc4f2de3c5 (diff)
downloadhdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.zip
hdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.tar.gz
hdf5-2521c4084c06f078846fe06bb1d3cd7bfa506316.tar.bz2
[svn-r12254] Purpose:
Anti-feature Description: Revert changes to H5G_stat_t struct, to make it compatible with the 1.6.x branch again. The information that was added to the H5G_stat_t struct will be reported through other API routines. Platforms tested: FreeBSD 4.11 (sleipnir) w/C++ Linux 2.4/64 (mir) w/C++ & Fortran Solaris 2.9 (shanti)
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c35
1 files changed, 13 insertions, 22 deletions
diff --git a/src/H5G.c b/src/H5G.c
index a606574..4ad8593 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -2284,23 +2284,9 @@ H5G_get_objinfo_cb(H5G_loc_t *grp_loc/*in*/, const char UNUSED *name, const H5O_
/* Common code to retrieve the file's fileno */
/* (Use the object location's file info, if it's available) */
- if(H5F_get_fileno((obj_loc ? obj_loc : grp_loc)->oloc->file, &statbuf->fileno) < 0)
+ if(H5F_get_fileno((obj_loc ? obj_loc : grp_loc)->oloc->file, &statbuf->fileno[0]) < 0)
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unable to read fileno")
- /* Get common info from link */
- if(lnk != NULL) {
- statbuf->cset = lnk->cset;
- statbuf->ctime = lnk->ctime;
- } /* end if */
- else {
- /* lookup must be on '.' */
- HDassert(HDstrcmp(name, ".") == 0);
-
- /* Set "fake" hard link info */
- statbuf->cset = H5T_CSET_ASCII;
- statbuf->ctime = 0;
- } /* end else */
-
/* Get info for soft link */
/* (If we don't follow the link, we can retrieve info about the soft link itself) */
if(!udata->follow_link && lnk && lnk->type == H5G_LINK_SOFT) {
@@ -2308,7 +2294,7 @@ H5G_get_objinfo_cb(H5G_loc_t *grp_loc/*in*/, const char UNUSED *name, const H5O_
statbuf->type = H5G_LINK;
/* Get length of link value */
- statbuf->u.slink.linklen = HDstrlen(lnk->u.soft.name) + 1; /*count the null terminator*/
+ statbuf->linklen = HDstrlen(lnk->u.soft.name) + 1; /*count the null terminator*/
} /* end if */
/* Get info for hard link */
else {
@@ -2318,20 +2304,25 @@ H5G_get_objinfo_cb(H5G_loc_t *grp_loc/*in*/, const char UNUSED *name, const H5O_
H5E_clear_stack(NULL); /* clear any errors resulting from checking type */
/* Get basic info for object */
- statbuf->u.obj.objno = obj_loc->oloc->addr;
- statbuf->u.obj.nlink = H5O_link(obj_loc->oloc, 0, udata->dxpl_id);
+ statbuf->objno[0] = (unsigned long)(obj_loc->oloc->addr);
+#if H5_SIZEOF_UINT64_T > H5_SIZEOF_LONG
+ statbuf->objno[1] = (unsigned long)(obj_loc->oloc->addr >> 8 * sizeof(long));
+#else
+ statbuf->objno[1] = 0;
+#endif
+ statbuf->nlink = H5O_link(obj_loc->oloc, 0, udata->dxpl_id);
/* Get creation time for object */
- if(NULL == H5O_read(obj_loc->oloc, H5O_MTIME_ID, 0, &(statbuf->u.obj.mtime), udata->dxpl_id)) {
+ if(NULL == H5O_read(obj_loc->oloc, H5O_MTIME_ID, 0, &(statbuf->mtime), udata->dxpl_id)) {
H5E_clear_stack(NULL);
- if(NULL == H5O_read(obj_loc->oloc, H5O_MTIME_NEW_ID, 0, &(statbuf->u.obj.mtime), udata->dxpl_id)) {
+ if(NULL == H5O_read(obj_loc->oloc, H5O_MTIME_NEW_ID, 0, &(statbuf->mtime), udata->dxpl_id)) {
H5E_clear_stack(NULL);
- statbuf->u.obj.mtime = 0;
+ statbuf->mtime = 0;
} /* end if */
} /* end if */
/* Get object header information */
- if(H5O_get_info(obj_loc->oloc, &(statbuf->u.obj.ohdr), udata->dxpl_id) < 0)
+ if(H5O_get_info(obj_loc->oloc, &(statbuf->ohdr), udata->dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get object header information")
} /* end else */
} /* end if */