summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/h5test.c31
-rw-r--r--test/h5test.h2
2 files changed, 33 insertions, 0 deletions
diff --git a/test/h5test.c b/test/h5test.c
index ce50a1d..3784001 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -450,6 +450,37 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
/*-------------------------------------------------------------------------
+ * Function: h5_rmprefix
+ *
+ * Purpose: This "removes" the MPIO driver prefix part of the file name
+ * by returning a pointer that points at the non-prefix component
+ * part of the file name. E.g.,
+ * Input Return
+ * pfs:/scratch1/dataX /scratch1/dataX
+ * /scratch2/dataY /scratch2/dataY
+ * Note that there is no change to the original file name.
+ *
+ * Return: Success: a pointer at the non-prefix part.
+ *
+ * Programmer: Albert Cheng; Jun 1, 2006
+ *
+ *-------------------------------------------------------------------------
+ */
+char *
+h5_rmprefix(const char *filename)
+{
+ char *ret_ptr;
+
+ if ((ret_ptr = HDstrstr(filename, ":")) == NULL)
+ ret_ptr = filename;
+ else
+ ret_ptr++;
+
+ return(ret_ptr);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: h5_fileaccess
*
* Purpose: Returns a file access template which is the default template
diff --git a/test/h5test.h b/test/h5test.h
index c065c34..28b6109 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -1,3 +1,4 @@
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by the Board of Trustees of the University of Illinois. *
* All rights reserved. *
@@ -126,6 +127,7 @@ H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname,
size_t size);
H5TEST_DLL hid_t h5_fileaccess(void);
H5TEST_DLL void h5_no_hwconv(void);
+H5TEST_DLL char *h5_rmprefix(const char *filename);
H5TEST_DLL void h5_reset(void);
H5TEST_DLL void h5_show_hostname(void);
H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename);