summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/h5repack/h5repack.h1
-rw-r--r--tools/h5repack/h5repack_copy.c2
-rw-r--r--tools/h5repack/h5repack_list.c2
-rw-r--r--tools/h5repack/h5repack_verify.c4
4 files changed, 5 insertions, 4 deletions
diff --git a/tools/h5repack/h5repack.h b/tools/h5repack/h5repack.h
index 79add4f..bd0ff5d 100644
--- a/tools/h5repack/h5repack.h
+++ b/tools/h5repack/h5repack.h
@@ -23,6 +23,7 @@
#define H5_REPACK_DEBUG
#endif
+#define H5FOPENERROR "unable to open file"
#define PFORMAT "%-7s %-7s %-7s\n" /*chunk info, compression info, name*/
#define PFORMAT1 "%-7s %-7s %-7s" /*chunk info, compression info, name*/
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index bbeb289..1ac6dbc 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -51,7 +51,7 @@ int copy_objects(const char* fnamein,
/* Open the files */
if ((fidin=H5Fopen(fnamein,H5F_ACC_RDONLY,H5P_DEFAULT))<0 ){
- printf("h5repack: <%s>: No such file or directory\n", fnamein );
+ printf("h5repack: <%s>: %s\n", fnamein, H5FOPENERROR );
exit(1);
}
if ((fidout=H5Fcreate(fnameout,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT))<0 ){
diff --git a/tools/h5repack/h5repack_list.c b/tools/h5repack/h5repack_list.c
index 3d43ec1..f28ff9e 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 files */
if ((fid=H5Fopen(fname,H5F_ACC_RDONLY,H5P_DEFAULT))<0 ){
- printf("h5repack: <%s>: No such file or directory\n", fname );
+ printf("h5repack: <%s>: %s\n", fname, H5FOPENERROR );
exit(1);
}
/* enable error reporting */
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c
index acede45..2283bc5 100644
--- a/tools/h5repack/h5repack_verify.c
+++ b/tools/h5repack/h5repack_verify.c
@@ -350,12 +350,12 @@ int h5repack_cmpdcpl(const char *fname1,
/* Open the files */
if ((fid1=H5Fopen(fname1,H5F_ACC_RDONLY,H5P_DEFAULT))<0 )
{
- printf("<%s>: No such file or directory\n", fname1 );
+ printf("h5repack: <%s>: %s\n", fname1, H5FOPENERROR );
return -1;
}
if ((fid2=H5Fopen(fname2,H5F_ACC_RDONLY,H5P_DEFAULT))<0 )
{
- printf("<%s>: No such file or directory\n", fname2 );
+ printf("h5repack: <%s>: %s\n", fname2, H5FOPENERROR );
H5Fclose(fid1);
return -1;
}