summaryrefslogtreecommitdiffstats
path: root/tools/src/misc/h5repart.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/misc/h5repart.c')
-rw-r--r--tools/src/misc/h5repart.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c
index e44c957..4432621 100644
--- a/tools/src/misc/h5repart.c
+++ b/tools/src/misc/h5repart.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
@@ -264,9 +262,9 @@ main (int argc, char *argv[])
sprintf (src_name, src_gen_name, src_membno);
src_is_family = strcmp (src_name, src_gen_name);
- if ((src=HDopen(src_name, O_RDONLY,0))<0) {
- perror (src_name);
- exit (EXIT_FAILURE);
+ if ((src = HDopen(src_name, O_RDONLY)) < 0) {
+ HDperror(src_name);
+ HDexit(EXIT_FAILURE);
}
if (HDfstat(src, &sb)<0) {
@@ -284,9 +282,9 @@ main (int argc, char *argv[])
sprintf (dst_name, dst_gen_name, dst_membno);
dst_is_family = strcmp (dst_name, dst_gen_name);
- if ((dst=HDopen (dst_name, O_RDWR|O_CREAT|O_TRUNC, 0666))<0) {
- perror (dst_name);
- exit (EXIT_FAILURE);
+ if ((dst = HDopen(dst_name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
+ HDperror(dst_name);
+ HDexit(EXIT_FAILURE);
}
if (verbose) fprintf (stderr, "> %s\n", dst_name);
@@ -365,9 +363,9 @@ main (int argc, char *argv[])
break;
}
sprintf (src_name, src_gen_name, ++src_membno);
- if ((src=HDopen (src_name, O_RDONLY,0))<0 && ENOENT==errno) {
- dst_offset = dst_offset + (off_t)n;
- break;
+ if ((src = HDopen(src_name, O_RDONLY)) < 0 && ENOENT == errno) {
+ dst_offset = dst_offset + (off_t)n;
+ break;
} else if (src<0) {
perror (src_name);
exit (EXIT_FAILURE);
@@ -412,9 +410,9 @@ main (int argc, char *argv[])
}
HDclose (dst);
sprintf (dst_name, dst_gen_name, ++dst_membno);
- if ((dst=HDopen (dst_name, O_RDWR|O_CREAT|O_TRUNC, 0666))<0) {
- perror (dst_name);
- exit (EXIT_FAILURE);
+ if ((dst = HDopen(dst_name, O_RDWR|O_CREAT|O_TRUNC, H5_POSIX_CREATE_MODE_RW)) < 0) {
+ HDperror(dst_name);
+ HDexit(EXIT_FAILURE);
}
dst_offset = 0;
need_seek = FALSE;