summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c29
1 files changed, 8 insertions, 21 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 2702ecd..2df59c3 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -35,7 +35,7 @@ const char *outfile = NULL;
* Command-line options: The user can specify short or long-named
* parameters.
*/
-static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:";
+static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:";
static struct long_options l_opts[] = {
{ "help", no_arg, 'h' },
{ "version", no_arg, 'V' },
@@ -51,6 +51,7 @@ static struct long_options l_opts[] = {
{ "ssize", require_arg, 's' },
{ "ublock", require_arg, 'u' },
{ "block", require_arg, 'b' },
+ { "metadata_block_size", require_arg, 'M' },
{ "threshold", require_arg, 't' },
{ "alignment", require_arg, 'a' },
{ "infile", require_arg, 'i' }, /* -i for backward compability */
@@ -76,24 +77,6 @@ static struct long_options l_opts[] = {
*
* Comments:
*
- * Modifications:
- * July 2004: Introduced the extra EC or NN option for SZIP
- * October 2006: Added a new switch -n, that allows to write the dataset
- * using a native type. The default to write is the file type.
- *
- * Modification:
- * Peter Cao, June 13, 2007
- * Add "-L, --latest" option to pack a file with the latest file format
- * PVN, November 19, 2007
- * adopted the syntax h5repack [OPTIONS] file1 file2
- * PVN, November 28, 2007
- * added support for multiple global filters
- * PVN, May 16, 2008
- * added backward compatibility for -i infile -o outfile
- * PVN, August 20, 2008
- * add a user block to repacked file (switches -u -b)
- * PVN, August 28, 2008
- * add options to set alignment (H5Pset_alignment) (switches -t -a)
*-------------------------------------------------------------------------
*/
int main(int argc, const char **argv)
@@ -184,6 +167,7 @@ static void usage(const char *prog)
printf(" -u U, --ublock=U Name of file U with user block data to be added\n");
printf(" -b B, --block=B Size of user block to be added\n");
+ printf(" -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size\n");
printf(" -t T, --threshold=T Threshold value for H5Pset_alignment\n");
printf(" -a A, --alignment=A Alignment value for H5Pset_alignment\n");
@@ -412,7 +396,6 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
break;
-
case 'u':
options->ublock_filename = opt_arg;
@@ -423,6 +406,11 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
options->ublock_size = (hsize_t)HDatol( opt_arg );
break;
+ case 'M':
+
+ options->meta_block_size = (hsize_t)HDatol( opt_arg );
+ break;
+
case 't':
options->threshold = (hsize_t)HDatol( opt_arg );
@@ -437,7 +425,6 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
HDexit(EXIT_FAILURE);
}
break;
-
} /* switch */