diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2002-09-30 16:31:55 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2002-09-30 16:31:55 (GMT) |
commit | d1e26ae3280320dcc7cd286b4ef77be552bfc244 (patch) | |
tree | b0b85f9e029956209be19e9b28f342a59294c260 /src/H5FDsec2.c | |
parent | 4cfb158c292f7707a8a87edfd4b525c6ad7bb4b8 (diff) | |
download | hdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.zip hdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.tar.gz hdf5-d1e26ae3280320dcc7cd286b4ef77be552bfc244.tar.bz2 |
[svn-r5951]
Purpose:
New API functions
Description:
Added API functions to return pointer to low-level file handle
(H5Fget_vfd_handle and H5FDget_vfd_handle) and related property list
setting functions(H5Pset_family_offset and H5Pset_multi_type).
Platforms tested:
Linux 2.2(eirene), Solaris 2.7(arabica), IRIX64 6.5(modi4)
Diffstat (limited to 'src/H5FDsec2.c')
-rw-r--r-- | src/H5FDsec2.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c index 4e2b1e2..f65bcbe 100644 --- a/src/H5FDsec2.c +++ b/src/H5FDsec2.c @@ -138,6 +138,7 @@ static herr_t H5FD_sec2_query(const H5FD_t *_f1, unsigned long *flags); static haddr_t H5FD_sec2_get_eoa(H5FD_t *_file); static herr_t H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr); static haddr_t H5FD_sec2_get_eof(H5FD_t *_file); +static herr_t H5FD_sec2_get_handle(H5FD_t *_file, hid_t fapl, void** file_handle); static herr_t H5FD_sec2_read(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, size_t size, void *buf); static herr_t H5FD_sec2_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, haddr_t addr, @@ -167,6 +168,7 @@ static const H5FD_class_t H5FD_sec2_g = { H5FD_sec2_get_eoa, /*get_eoa */ H5FD_sec2_set_eoa, /*set_eoa */ H5FD_sec2_get_eof, /*get_eof */ + H5FD_sec2_get_handle, /*get_handle */ H5FD_sec2_read, /*read */ H5FD_sec2_write, /*write */ H5FD_sec2_flush, /*flush */ @@ -570,6 +572,37 @@ done: /*------------------------------------------------------------------------- + * Function: H5FD_sec2_get_handle + * + * Purpose: Returns the file handle of sec2 file driver. + * + * Returns: Non-negative if succeed or negative if fails. + * + * Programmer: Raymond Lu + * Sept. 16, 2002 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static herr_t +H5FD_sec2_get_handle(H5FD_t *_file, hid_t UNUSED fapl, void** file_handle) +{ + H5FD_sec2_t *file = (H5FD_sec2_t *)_file; + herr_t ret_value = SUCCEED; + + FUNC_ENTER_NOAPI(H5FD_sec2_get_handle, FAIL); + + if(!file_handle) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "file handle not valid"); + *file_handle = &(file->fd); + +done: + FUNC_LEAVE(ret_value); +} + + +/*------------------------------------------------------------------------- * Function: H5FD_sec2_read * * Purpose: Reads SIZE bytes of data from FILE beginning at address ADDR |