diff options
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r-- | src/H5FDstdio.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index 1c42900..62dc93c 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -111,12 +111,13 @@ static H5FD_t *H5FD_stdio_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr); static herr_t H5FD_stdio_close(H5FD_t *lf); static int H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2); +static herr_t H5FD_stdio_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_stdio_get_eoa(H5FD_t *_file); static herr_t H5FD_stdio_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_stdio_get_eof(H5FD_t *_file); static herr_t H5FD_stdio_read(H5FD_t *lf, hid_t fapl_id, haddr_t addr, hsize_t size, void *buf); -static herr_t H5FD_stdio_write(H5FD_t *lf, hid_t fapl_id, haddr_t addr, +static herr_t H5FD_stdio_write(H5FD_t *lf, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, hsize_t size, const void *buf); static herr_t H5FD_stdio_flush(H5FD_t *_file); @@ -136,6 +137,7 @@ static const H5FD_class_t H5FD_stdio_g = { H5FD_stdio_open, /*open */ H5FD_stdio_close, /*close */ H5FD_stdio_cmp, /*cmp */ + H5FD_stdio_query, /*query */ NULL, /*alloc */ NULL, /*free */ H5FD_stdio_get_eoa, /*get_eoa */ @@ -409,6 +411,38 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2) /*------------------------------------------------------------------------- + * Function: H5FD_stdio_query + * + * Purpose: Set the flags that this VFL driver is capable of supporting. + * (listed in H5FDpublic.h) + * + * Return: Success: non-negative + * + * Failure: negative + * + * Programmer: Quincey Koziol + * Friday, August 25, 2000 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */) +{ + const H5FD_stdio_t *f = (const H5FD_stdio_t*)_f; + + /* Set the VFL feature flags that this driver supports */ + if(flags) { + *flags|=H5FD_FEAT_AGGREGATE_METADATA; /* OK to aggregate metadata allocations */ + *flags|=H5FD_FEAT_ACCUMULATE_METADATA; /* OK to accumulate metadata for faster writes */ + } /* end if */ + + return(0); +} + + +/*------------------------------------------------------------------------- * Function: H5FD_stdio_get_eoa * * Purpose: Gets the end-of-address marker for the file. The EOA marker @@ -628,7 +662,7 @@ H5FD_stdio_read(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, hsize_t size, *------------------------------------------------------------------------- */ static herr_t -H5FD_stdio_write(H5FD_t *_file, hid_t dxpl_id, haddr_t addr, +H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, hsize_t size, const void *buf) { H5FD_stdio_t *file = (H5FD_stdio_t*)_file; |