summaryrefslogtreecommitdiffstats
path: root/src/H5Fstdio.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-10-24 21:03:10 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-10-24 21:03:10 (GMT)
commit833e82fec5f654c1ed93a6e4e4266f280e20311c (patch)
tree4c1f5d776652cfef707455fbee246af0a5780a80 /src/H5Fstdio.c
parente1e488bd4758a0e5b85a8e04052146a93c3e5751 (diff)
downloadhdf5-833e82fec5f654c1ed93a6e4e4266f280e20311c.zip
hdf5-833e82fec5f654c1ed93a6e4e4266f280e20311c.tar.gz
hdf5-833e82fec5f654c1ed93a6e4e4266f280e20311c.tar.bz2
[svn-r134] Changes since 19971023
---------------------- ./config/conclude.in Test work when `.' isn't in $PATH. ./src/H5F.c ./src/H5Fcore.c NEW ./src/H5Flow.c ./src/H5Fprivate.h ./src/H5Fsec2.c ./src/H5Fstdio.c ./src/Makefile.in ./MANIFEST Added the in-core temporary file driver as an exercise to clean up some of the H5F package. It speeds up `testhdf5 -o stab' by 25 percent! If you want to try it you'll need to recompile everything with `-DH5F_LOW_DFLT=H5F_LOW_CORE'. Don't expect testhdf5 to ever work since creating a file, closing it, and then opening it for read-only will fail.
Diffstat (limited to 'src/H5Fstdio.c')
-rw-r--r--src/H5Fstdio.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c
index d2b868d..cd47f3a 100644
--- a/src/H5Fstdio.c
+++ b/src/H5Fstdio.c
@@ -13,10 +13,15 @@
#include <H5Fprivate.h>
#include <H5MMprivate.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+
#define PABLO_MASK H5F_sec2
static hbool_t interface_initialize_g = FALSE;
-static H5F_low_t *H5F_stdio_open (const char *name, uintn flags);
+static H5F_low_t *H5F_stdio_open (const char *name, uintn flags,
+ H5F_search_t *key);
static herr_t H5F_stdio_close (H5F_low_t *lf);
static herr_t H5F_stdio_read (H5F_low_t *lf, haddr_t addr, size_t size,
uint8 *buf);
@@ -27,6 +32,7 @@ static size_t H5F_stdio_size (H5F_low_t *lf);
const H5F_low_class_t H5F_LOW_STDIO[1] = {{
+ NULL, /* use default access(2) func */
H5F_stdio_open, /* open method */
H5F_stdio_close, /* close method */
H5F_stdio_read, /* read method */
@@ -64,10 +70,11 @@ const H5F_low_class_t H5F_LOW_STDIO[1] = {{
*-------------------------------------------------------------------------
*/
static H5F_low_t *
-H5F_stdio_open (const char *name, uintn flags)
+H5F_stdio_open (const char *name, uintn flags, H5F_search_t *key)
{
H5F_low_t *lf=NULL;
FILE *f=NULL;
+ struct stat sb;
FUNC_ENTER (H5F_stdio_open, NULL, NULL);
@@ -98,6 +105,13 @@ H5F_stdio_open (const char *name, uintn flags)
lf->u.stdio.op = H5F_OP_SEEK;
lf->u.stdio.cur = 0;
+ /* The unique key */
+ if (key) {
+ fstat (fileno (f), &sb);
+ key->dev = sb.st_dev;
+ key->ino = sb.st_ino;
+ }
+
FUNC_LEAVE (lf);
}