summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_copy.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-03-27 20:09:01 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-03-27 20:09:01 (GMT)
commit26e1b18a578af61b491ff47a32779507df77a6ff (patch)
tree7ed5546454ffd360082b8ab2da1b7f85677cb3c0 /tools/h5repack/h5repack_copy.c
parent983e043587f221bc2d0ebc17e403f8f61f438dfd (diff)
downloadhdf5-26e1b18a578af61b491ff47a32779507df77a6ff.zip
hdf5-26e1b18a578af61b491ff47a32779507df77a6ff.tar.gz
hdf5-26e1b18a578af61b491ff47a32779507df77a6ff.tar.bz2
[svn-r12159] Purpose:
bug fix Description: h5repack was not dealing with family files Solution: use the toolslib function h5tools_open to open the file instead of H5Fopen in h5repack Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_copy.c')
-rw-r--r--tools/h5repack/h5repack_copy.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index e5d962a..436012a 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -145,7 +145,9 @@ static void print_obj(hid_t dcpl_id, char *name)
int copy_objects(const char* fnamein,
const char* fnameout,
- pack_opt_t *options)
+ pack_opt_t *options,
+ int argc,
+ const char *argv[])
{
hid_t fidin;
hid_t fidout=(-1);
@@ -155,12 +157,12 @@ int copy_objects(const char* fnamein,
* open the files
*-------------------------------------------------------------------------
*/
- if ((fidin=H5Fopen(fnamein,H5F_ACC_RDONLY,H5P_DEFAULT))<0 ){
- printf("h5repack: <%s>: %s\n", fnamein, H5FOPENERROR );
+ if ((fidin=h5tools_fopen(fnamein, NULL, NULL, 0, argc, argv))<0 ){
+ printf("<%s>: %s\n", fnamein, H5FOPENERROR );
goto out;
}
if ((fidout=H5Fcreate(fnameout,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0 ){
- printf("h5repack: <%s>: Could not create file\n", fnameout );
+ printf("<%s>: Could not create file\n", fnameout );
goto out;
}
@@ -179,7 +181,7 @@ int copy_objects(const char* fnamein,
*-------------------------------------------------------------------------
*/
if(do_copy_objects(fidin,fidout,travt,options)<0) {
- printf("h5repack: <%s>: Could not copy data to: %s\n", fnamein, fnameout);
+ printf("<%s>: Could not copy data to: %s\n", fnamein, fnameout);
goto out;
}
@@ -189,7 +191,7 @@ int copy_objects(const char* fnamein,
*-------------------------------------------------------------------------
*/
if(do_copy_refobjs(fidin,fidout,travt,options)<0) {
- printf("h5repack: <%s>: Could not copy data to: %s\n", fnamein, fnameout);
+ printf("<%s>: Could not copy data to: %s\n", fnamein, fnameout);
goto out;
}