summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
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
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')
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5repack/h5repack_list.c2
2 files changed, 2 insertions, 2 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;
}
diff --git a/tools/h5repack/h5repack_list.c b/tools/h5repack/h5repack_list.c
index 5aa127b..b1d8ee9 100644
--- a/tools/h5repack/h5repack_list.c
+++ b/tools/h5repack/h5repack_list.c
@@ -51,7 +51,7 @@ int check_objects(const char* fname,
* open the file
*-------------------------------------------------------------------------
*/
- if ((fid=h5tools_fopen(fname, NULL, NULL, 0))<0){
+ if ((fid=h5tools_fopen(fname, H5F_ACC_RDONLY, NULL, NULL, 0))<0){
printf("<%s>: %s\n", fname, H5FOPENERROR );
return -1;
}