summaryrefslogtreecommitdiffstats
path: root/test/twriteorder.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2017-04-28 22:13:22 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2017-04-28 22:13:22 (GMT)
commit734aebc39538039c6e81db63edd68eb3a2029cd2 (patch)
treea97a60916799024ba2646e7770ded47320d444c4 /test/twriteorder.c
parentd3b664b6a79508d78974a347a9d450e72defb76b (diff)
downloadhdf5-734aebc39538039c6e81db63edd68eb3a2029cd2.zip
hdf5-734aebc39538039c6e81db63edd68eb3a2029cd2.tar.gz
hdf5-734aebc39538039c6e81db63edd68eb3a2029cd2.tar.bz2
Rework of the POSIX file open permissions and macros to clean up
HDopen() calls. Also fixed a minor const warning in the core VFD.
Diffstat (limited to 'test/twriteorder.c')
-rw-r--r--test/twriteorder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/twriteorder.c b/test/twriteorder.c
index 3ecd3e0..4c86636 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -231,9 +231,9 @@ int create_wo_file(void)
int ret_code;
/* Create the data file */
- if ((write_fd_g = HDopen(DATAFILE, O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_OPEN_MODE_0666)) < 0) {
- printf("WRITER: error from open\n");
- return -1;
+ if ((write_fd_g = HDopen(DATAFILE, O_RDWR|O_TRUNC|O_CREAT, H5_POSIX_CREATE_MODE_RW)) < 0) {
+ HDprintf("WRITER: error from open\n");
+ return -1;
}
blkaddr=0;
/* write it to partition 0 */
@@ -297,9 +297,9 @@ int read_wo_file(void)
char buffer[BLOCKSIZE_DFT];
/* Open the data file */
- if ((read_fd = HDopen(DATAFILE, O_RDONLY, H5_POSIX_OPEN_MODE_0000)) < 0) {
- printf("READER: error from open\n");
- return -1;
+ if ((read_fd = HDopen(DATAFILE, O_RDONLY)) < 0) {
+ HDprintf("READER: error from open\n");
+ return -1;
}
/* keep reading the initial block address until it is non-zero before proceeding. */
while (blkaddr == 0){