summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2009-10-15 17:43:24 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2009-10-15 17:43:24 (GMT)
commitd1bb0c7bb338b36c51fb502285c1d6fd6306db18 (patch)
tree2ade59212667980e4b4f12706d9eedc364369335 /tools/h5repack
parent7ed7937f96bf2c95d55b69038949c1176e204f5b (diff)
downloadhdf5-d1bb0c7bb338b36c51fb502285c1d6fd6306db18.zip
hdf5-d1bb0c7bb338b36c51fb502285c1d6fd6306db18.tar.gz
hdf5-d1bb0c7bb338b36c51fb502285c1d6fd6306db18.tar.bz2
[svn-r17646] 1. tools/h5repack/h5repack_main.c: accept string for strategy instead of a number
2. tools/h5stat/h5stat.c: clean up and activate options as stated in usage 3. tools/h5stat/testfiles/*.ddl: modified according to the latest output -This line, and those below, will be ignored-- M tools/h5repack/h5repack_main.c M tools/h5stat/testfiles/h5stat_newgrat.ddl M tools/h5stat/testfiles/h5stat_filters.ddl M tools/h5stat/testfiles/h5stat_help1.ddl M tools/h5stat/testfiles/h5stat_help2.ddl M tools/h5stat/testfiles/h5stat_tsohm.ddl M tools/h5stat/testfiles/h5stat_filters-F.ddl M tools/h5stat/h5stat.c
Diffstat (limited to 'tools/h5repack')
-rw-r--r--tools/h5repack/h5repack_main.c44
1 files changed, 30 insertions, 14 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index b6e645a3..930397f 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -182,8 +182,8 @@ static void usage(const char *prog)
printf(" -a A, --alignment=A Alignment value for H5Pset_alignment\n");
printf(" -f FILT, --filter=FILT Filter type\n");
printf(" -l LAYT, --layout=LAYT Layout type\n");
- printf(" -S STRGY, --fs_strategy=STRGY File-space-handling strategy\n");
- printf(" -T THRD, --fs_threshold=THRD Free-space section threshold\n");
+ printf(" -S FS_STRGY, --fs_strategy=FS_STRGY File space management strategy\n");
+ printf(" -T FS_THRD, --fs_threshold=FS_THRD Free-space section threshold\n");
printf("\n");
@@ -198,17 +198,18 @@ static void usage(const char *prog)
printf(" F - is the shared object header message type, any of <dspace|dtype|fill|\n");
printf(" pline|attr>. If F is not specified, S applies to all messages\n");
printf("\n");
- printf(" STRGY is an integer value listed below:\n");
- printf(" 1: Use persistent free-space managers, aggregators and virtual file driver for allocation\n");
- printf(" 2: Use non-persistent free-space managers, aggregators and virtual file driver for allocation\n");
- printf(" 3: Use aggregators and virtual file driver for allocation\n");
- printf(" 4: Use virtual file driver for allocation\n");
- printf(" A value of 0 retains the existing file-space-handling strategy used in the library.\n");
- printf(" The library default is 2.\n");
+ printf(" FS_STRGY is the file space management strategy to use for the output file.\n");
+ printf(" It is a string as listed below:\n");
+ printf(" ALL_PERSIST - Use persistent free-space managers, aggregators and virtual file driver\n");
+ printf(" for file space allocation\n");
+ printf(" ALL - Use non-persistent free-space managers, aggregators and virtual file driver\n");
+ printf(" for file space allocation\n");
+ printf(" AGGR_VFD - Use aggregators and virtual file driver for file space allocation\n");
+ printf(" VFD - Use virtual file driver for file space allocation\n");
printf("\n");
- printf(" THRD is the minimum size of free-space sections to track by the free-space managers.\n");
- printf(" A value of 0 retains the existing free-space section threshold used in the library.\n");
- printf(" The library default is 1.\n");
+ printf(" FS_THRD is the free-space section threshold to use for the output file.\n");
+ printf(" It is the minimum size (in bytes) of free-space sections to be tracked\n");
+ printf(" by the the library's free-space managers.\n");
printf("\n");
printf(" FILT - is a string with the format:\n");
@@ -445,9 +446,24 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
case 'S':
-
- options->fs_strategy = atol( opt_arg );
+ {
+ char strategy[MAX_NC_NAME];
+
+ strcpy(strategy, opt_arg);
+ if(!strcmp(strategy, "ALL_PERSIST"))
+ options->fs_strategy = H5F_FILE_SPACE_ALL_PERSIST;
+ else if(!strcmp(strategy, "ALL"))
+ options->fs_strategy = H5F_FILE_SPACE_ALL;
+ else if(!strcmp(strategy, "AGGR_VFD"))
+ options->fs_strategy = H5F_FILE_SPACE_AGGR_VFD;
+ else if(!strcmp(strategy, "VFD"))
+ options->fs_strategy = H5F_FILE_SPACE_VFD;
+ else {
+ error_msg(progname, "invalid file space management strategy\n", opt_arg );
+ exit(EXIT_FAILURE);
+ }
break;
+ }
case 'T':