diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-13 22:42:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-02-13 22:42:43 (GMT) |
commit | d3c5ab50fc8fba8ff72417b125feaac8a3faed68 (patch) | |
tree | 541b46eca7b891581a3d29808806db8dfa73906c /tools/lib/h5tools.c | |
parent | 1603adeaee43e22b61055633c1dc2250aaa3a922 (diff) | |
download | hdf5-d3c5ab50fc8fba8ff72417b125feaac8a3faed68.zip hdf5-d3c5ab50fc8fba8ff72417b125feaac8a3faed68.tar.gz hdf5-d3c5ab50fc8fba8ff72417b125feaac8a3faed68.tar.bz2 |
[svn-r13292] Description:
Add feature to h5copy to allow it to add an object to an existing file,
instead of blowing away existing file.
Modify h5tools_fopen() routine to take access flags, so it can be used
to open an existing file for writing.
Added check to h5copy test script that verifies it has produced a file
with the correct structure.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r-- | tools/lib/h5tools.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index c11718e..429898a 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -308,8 +308,8 @@ error: *------------------------------------------------------------------------- */ hid_t -h5tools_fopen(const char *fname, const char *driver, char *drivername, - size_t drivername_size) +h5tools_fopen(const char *fname, unsigned flags, const char *driver, + char *drivername, size_t drivername_size) { unsigned drivernum; hid_t fid = FAIL; @@ -321,7 +321,7 @@ h5tools_fopen(const char *fname, const char *driver, char *drivername, goto done; H5E_BEGIN_TRY { - fid = H5Fopen(fname, H5F_ACC_RDONLY, fapl); + fid = H5Fopen(fname, flags, fapl); } H5E_END_TRY; if (fid == FAIL) @@ -335,7 +335,7 @@ h5tools_fopen(const char *fname, const char *driver, char *drivername, goto done; H5E_BEGIN_TRY { - fid = H5Fopen(fname, H5F_ACC_RDONLY, fapl); + fid = H5Fopen(fname, flags, fapl); } H5E_END_TRY; if (fid != FAIL) |