diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-15 21:00:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-07-15 21:00:15 (GMT) |
commit | 516c63299f638bf0f9ab6d58268e8edf28515ed4 (patch) | |
tree | 2fa0ac337fd747bc96d131a0bc72429f32ed97e6 /src/H5G.c | |
parent | 1572fb46e083a6d44235c77638752777106e86d3 (diff) | |
download | hdf5-516c63299f638bf0f9ab6d58268e8edf28515ed4.zip hdf5-516c63299f638bf0f9ab6d58268e8edf28515ed4.tar.gz hdf5-516c63299f638bf0f9ab6d58268e8edf28515ed4.tar.bz2 |
[svn-r15367] Description:
Add check to avoid mounting the a file on a group twice, then the mounts
are done on the same HDF5 file, but opened with separate H5Fopen calls.
Also add new 'mounted' flag to the H5G_info_t struct, queried with the
H5Gget_info() API call, to allow applications to detect and avoid this
situation.
This probably fixes Bz#1070 also, I'll check with Dan Anov (who reported
a different sort of behavior, but seems to have the same underlying problem).
Tested on:
Mac OS X/32 10.5.4 (amazon)
Linux/64 2.6 (chicago)
Diffstat (limited to 'src/H5G.c')
-rw-r--r-- | src/H5G.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -1526,6 +1526,30 @@ H5G_mount(H5G_t *grp) /*------------------------------------------------------------------------- + * Function: H5G_mounted + * + * Purpose: Retrieves the 'mounted' flag for a group + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Quincey Koziol + * Tuesday, July 15, 2008 + * + *------------------------------------------------------------------------- + */ +hbool_t +H5G_mounted(H5G_t *grp) +{ + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5G_mounted) + + /* Check args */ + HDassert(grp && grp->shared); + + FUNC_LEAVE_NOAPI(grp->shared->mounted) +} /* end H5G_mounted() */ + + +/*------------------------------------------------------------------------- * Function: H5G_unmount * * Purpose: Resets the 'mounted' flag for a group |