summaryrefslogtreecommitdiffstats
path: root/test/swmr_writer.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-09 16:30:58 (GMT)
commitc8f533cfc33ac743227cbed8eba361c715a2976f (patch)
treebcae5320f80bac774647cacbbd8493604f9384d2 /test/swmr_writer.c
parentadcf8a315e82c0848d126e7e46b662930c081896 (diff)
downloadhdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.zip
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.gz
hdf5-c8f533cfc33ac743227cbed8eba361c715a2976f.tar.bz2
Merge all of my changes from merge-back-to-feature-vfd_swmr-attempt-1,
including the merge of `hdffv/hdf5/develop`, back to the branch that Vailin and I share. Now I need to put this branch on a fork with a less confusing name than vchoi_fork!
Diffstat (limited to 'test/swmr_writer.c')
-rw-r--r--test/swmr_writer.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/test/swmr_writer.c b/test/swmr_writer.c
index ee7e32e..11b8234 100644
--- a/test/swmr_writer.c
+++ b/test/swmr_writer.c
@@ -197,7 +197,7 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file,
hid_t file_sid; /* Dataset's space ID */
/* Get a random dataset, according to the symbol distribution */
- symbol = choose_dataset();
+ symbol = choose_dataset(NULL, NULL);
/* Set the record's ID (equal to its position) */
record.rec_id = symbol->nrecords;
@@ -277,21 +277,21 @@ add_records(hid_t fid, hbool_t verbose, FILE *verbose_file,
static void
usage(void)
{
- printf("\n");
- printf("Usage error!\n");
- printf("\n");
- printf("Usage: swmr_writer [-q] [-o] [-f <# of records to write between flushing\n");
- printf(" file contents>] [-r <random seed>] <# of records>\n");
- printf("\n");
- printf("<# of records to write between flushing file contents> should be 0\n");
- printf("(for no flushing) or between 1 and (<# of records> - 1).\n");
- printf("\n");
- printf("<# of records> must be specified.\n");
- printf("\n");
- printf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
- printf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
- printf("\n");
- HDexit(1);
+ HDprintf("\n");
+ HDprintf("Usage error!\n");
+ HDprintf("\n");
+ HDprintf("Usage: swmr_writer [-q] [-o] [-f <# of records to write between flushing\n");
+ HDprintf(" file contents>] [-r <random seed>] <# of records>\n");
+ HDprintf("\n");
+ HDprintf("<# of records to write between flushing file contents> should be 0\n");
+ HDprintf("(for no flushing) or between 1 and (<# of records> - 1).\n");
+ HDprintf("\n");
+ HDprintf("<# of records> must be specified.\n");
+ HDprintf("\n");
+ HDprintf("Defaults to verbose (no '-q' given), latest format when opening file (no '-o' given),\n");
+ HDprintf("flushing every 10000 records ('-f 10000'), and will generate a random seed (no -r given).\n");
+ HDprintf("\n");
+ HDexit(EXIT_FAILURE);
}
int main(int argc, const char *argv[])
@@ -379,7 +379,7 @@ int main(int argc, const char *argv[])
HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.out.%u", random_seed);
if(NULL == (verbose_file = HDfopen(verbose_name, "w"))) {
HDfprintf(stderr, "Can't open verbose output file!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
}
} /* end if */
@@ -408,7 +408,7 @@ int main(int argc, const char *argv[])
/* Open file skeleton */
if((fid = open_skeleton(FILENAME, verbose, verbose_file, random_seed, old)) < 0) {
HDfprintf(stderr, "Error opening skeleton file!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Send a message to indicate "H5Fopen" is complete--releasing the file lock */
@@ -421,7 +421,7 @@ int main(int argc, const char *argv[])
/* Append records to datasets */
if(add_records(fid, verbose, verbose_file, (unsigned long)nrecords, (unsigned long)flush_count) < 0) {
HDfprintf(stderr, "Error appending records to datasets!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -431,7 +431,7 @@ int main(int argc, const char *argv[])
/* Clean up the symbols */
if(shutdown_symbols() < 0) {
HDfprintf(stderr, "Error releasing symbols!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
/* Emit informational message */
@@ -441,7 +441,7 @@ int main(int argc, const char *argv[])
/* Close objects opened */
if(H5Fclose(fid) < 0) {
HDfprintf(stderr, "Error closing file!\n");
- HDexit(1);
+ HDexit(EXIT_FAILURE);
} /* end if */
return 0;