summaryrefslogtreecommitdiffstats
path: root/src/H5Fquery.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-12-01 18:34:23 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-12-01 18:34:23 (GMT)
commita4750dfae7e187f95c4515939968e6fce880efed (patch)
tree0fc33c6dda70c952d83759c937ff3bf9499aaa86 /src/H5Fquery.c
parentdfd01b8331fd3173c396c1ec3e6523db8a8adb9e (diff)
downloadhdf5-a4750dfae7e187f95c4515939968e6fce880efed.zip
hdf5-a4750dfae7e187f95c4515939968e6fce880efed.tar.gz
hdf5-a4750dfae7e187f95c4515939968e6fce880efed.tar.bz2
[svn-r17946] Description:
Bring r17899:17945 from trunk to revise_chunks branch Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Mac OS X/32 10.6.2 (amazon) in debug mode Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Fquery.c')
-rw-r--r--src/H5Fquery.c130
1 files changed, 111 insertions, 19 deletions
diff --git a/src/H5Fquery.c b/src/H5Fquery.c
index 70c5ff1..c5ecf6b 100644
--- a/src/H5Fquery.c
+++ b/src/H5Fquery.c
@@ -103,54 +103,81 @@ H5F_get_intent(const H5F_t *f)
/*-------------------------------------------------------------------------
- * Function: H5F_get_extpath
+ * Function: H5F_get_open_name
*
- * Purpose: Retrieve the file's 'extpath' flags
- * This is used by H5L_extern_traverse() to retrieve the main file's location
- * when searching the target file.
+ * Purpose: Retrieve the name used to open a file.
*
- * Return: 'extpath' on success/abort on failure (shouldn't fail)
+ * Return: Success: The name of the file.
+ * Failure: ? (should not happen)
*
- * Programmer: Vailin Choi, April 2, 2008
+ * Programmer: Neil Fortner
+ * December 15 2008
*
*-------------------------------------------------------------------------
*/
char *
-H5F_get_extpath(const H5F_t *f)
+H5F_get_open_name(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_extpath)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_open_name)
HDassert(f);
+ HDassert(f->open_name);
- FUNC_LEAVE_NOAPI(f->extpath)
-} /* end H5F_get_extpath() */
+ FUNC_LEAVE_NOAPI(f->open_name)
+} /* end H5F_get_open_name() */
/*-------------------------------------------------------------------------
- * Function: H5F_get_name
+ * Function: H5F_get_actual_name
*
- * Purpose: Retrieve the name of a file.
+ * Purpose: Retrieve the actual name of a file, after resolving symlinks, etc.
*
* Return: Success: The name of the file.
- *
* Failure: ? (should not happen)
*
- * Programmer: Neil Fortner
- * December 15 2008
+ * Programmer: Quincey Koziol
+ * November 25 2009
*
*-------------------------------------------------------------------------
*/
char *
-H5F_get_name(const H5F_t *f)
+H5F_get_actual_name(const H5F_t *f)
{
/* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_name)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_actual_name)
HDassert(f);
+ HDassert(f->actual_name);
- FUNC_LEAVE_NOAPI(f->name)
-} /* end H5F_get_name() */
+ FUNC_LEAVE_NOAPI(f->actual_name)
+} /* end H5F_get_actual_name() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_extpath
+ *
+ * Purpose: Retrieve the file's 'extpath' flags
+ * This is used by H5L_extern_traverse() to retrieve the main file's location
+ * when searching the target file.
+ *
+ * Return: 'extpath' on success/abort on failure (shouldn't fail)
+ *
+ * Programmer: Vailin Choi, April 2, 2008
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+H5F_get_extpath(const H5F_t *f)
+{
+ /* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_extpath)
+
+ HDassert(f);
+ HDassert(f->extpath);
+
+ FUNC_LEAVE_NOAPI(f->extpath)
+} /* end H5F_get_extpath() */
/*-------------------------------------------------------------------------
@@ -690,6 +717,71 @@ done:
/*-------------------------------------------------------------------------
+ * Function: H5F_get_eoa
+ *
+ * Purpose: Quick and dirty routine to retrieve the file's 'eoa' value
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * June 1, 2004
+ *
+ *-------------------------------------------------------------------------
+ */
+haddr_t
+H5F_get_eoa(const H5F_t *f, H5FD_mem_t type)
+{
+ haddr_t ret_value;
+
+ FUNC_ENTER_NOAPI(H5F_get_eoa, HADDR_UNDEF)
+
+ HDassert(f);
+ HDassert(f->shared);
+
+ /* Dispatch to driver */
+ if(HADDR_UNDEF == (ret_value = H5FD_get_eoa(f->shared->lf, type)))
+ HGOTO_ERROR(H5E_VFL, H5E_CANTINIT, HADDR_UNDEF, "driver get_eoa request failed")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_eoa() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5F_get_vfd_handle
+ *
+ * Purpose: Returns a pointer to the file handle of the low-level file
+ * driver. This is the private function for H5Fget_vfd_handle.
+ *
+ * Return: Success: Non-negative.
+ * Failure: negative.
+ *
+ * Programmer: Raymond Lu
+ * Sep. 16, 2002
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5F_get_vfd_handle(const H5F_t *file, hid_t fapl, void **file_handle)
+{
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI(H5F_get_vfd_handle, FAIL)
+
+ /* Sanity check */
+ HDassert(file);
+ HDassert(file_handle);
+
+ /* Get the VFD handle */
+ if(H5FD_get_vfd_handle(file->shared->lf, fapl, file_handle) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file handle for file driver")
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5F_get_vfd_handle() */
+
+
+/*-------------------------------------------------------------------------
* Function: H5F_is_tmp_addr
*
* Purpose: Quick and dirty routine to determine if an address is in