diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2014-04-25 19:54:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2014-04-25 19:54:57 (GMT) |
commit | 4257a32de13576155efc6df64aa0282bdf074ff1 (patch) | |
tree | 4da2d29685eb8c88e804d6daed0b59830cdbbffa /src/H5FD.c | |
parent | b018ba48ced579975e60362e3acfb6afb1f1d384 (diff) | |
download | hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.zip hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.gz hdf5-4257a32de13576155efc6df64aa0282bdf074ff1.tar.bz2 |
[svn-r25109] Description:
Bring r25084, 25088, 25092, 25097 from trunk to 1.8 branch:
r25084:
Begin process of migrating from using property list IDs internally to the
library to using the internal generic property list data structure.
r25088:
Introduce "file I/O info" struct, to hold file & dxpl pointers, and start
propagating up through library.
r25092:
More migration to using H5F_io_info_t pointers and away from using
property list IDs internally. Also, clean up some compiler warnings in the
cache code.
r25097:
Make progress toward moving from DXPL IDs to property list structures
within the library. Also move the signature location code from the H5F
package to the H5FD package, where it's a better fit. Also, clean up some
more compiler warnings along the way.
Tested:
Mac OSX/64 10.9.2 (amazon) w/C++, FORTRAN & parallel
(h5committested on trunk)
Diffstat (limited to 'src/H5FD.c')
-rw-r--r-- | src/H5FD.c | 22 |
1 files changed, 14 insertions, 8 deletions
@@ -1669,15 +1669,14 @@ done: * Programmer: Robb Matzke * Thursday, July 29, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, void *buf/*out*/) { - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *dxpl; /* DXPL object */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE6("e", "*xMtiazx", file, type, dxpl_id, addr, size, buf); @@ -1695,9 +1694,13 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size if(!buf) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null result buffer") + /* Get the DXPL plist object for DXPL ID */ + if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + /* Do the real work */ /* (Note compensating for base address addition in internal routine) */ - if(H5FD_read(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0) + if(H5FD_read(file, dxpl, type, addr - file->base_addr, size, buf) < 0) HGOTO_ERROR(H5E_VFL, H5E_READERROR, FAIL, "file read request failed") done: @@ -1720,15 +1723,14 @@ done: * Programmer: Robb Matzke * Thursday, July 29, 1999 * - * Modifications: - * *------------------------------------------------------------------------- */ herr_t H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size, const void *buf) { - herr_t ret_value = SUCCEED; /* Return value */ + H5P_genplist_t *dxpl; /* DXPL object */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE6("e", "*xMtiaz*x", file, type, dxpl_id, addr, size, buf); @@ -1745,9 +1747,13 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz if(!buf) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "null buffer") + /* Get the DXPL plist object for DXPL ID */ + if(NULL == (dxpl = (H5P_genplist_t *)H5I_object(dxpl_id))) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get property list") + /* The real work */ /* (Note compensating for base address addition in internal routine) */ - if(H5FD_write(file, dxpl_id, type, addr - file->base_addr, size, buf) < 0) + if(H5FD_write(file, dxpl, type, addr - file->base_addr, size, buf) < 0) HGOTO_ERROR(H5E_VFL, H5E_WRITEERROR, FAIL, "file write request failed") done: |