summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-02-13 22:42:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-02-13 22:42:43 (GMT)
commitd3c5ab50fc8fba8ff72417b125feaac8a3faed68 (patch)
tree541b46eca7b891581a3d29808806db8dfa73906c /tools/h5repack/h5repack_copy.c
parent1603adeaee43e22b61055633c1dc2250aaa3a922 (diff)
downloadhdf5-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/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 827c2c3..e43831e 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -181,7 +181,7 @@ int copy_objects(const char* fnamein,
* open the files
*-------------------------------------------------------------------------
*/
- if ((fidin=h5tools_fopen(fnamein, NULL, NULL, 0))<0 ){
+ if ((fidin=h5tools_fopen(fnamein, H5F_ACC_RDONLY, NULL, NULL, 0))<0 ){
error_msg(progname, "<%s>: %s\n", fnamein, H5FOPENERROR );
goto out;
}