[svn-r17713] Add the following patch
===
The following patch to h5copy.c on or near line 173 makes the
tool substantially more useful...
*flag = (*flag) | fla;
Because the command-line option parsing permits multiple '-f' arguments,
this will have the effect of or'ing the flags together so one can do
someting like....
~/tmp/hdf5-1.8.1/tools/h5copy/h5copy -i multi_ucd3d.h5 -s block5 -o gorfo -d foo
-f shallow -f soft
Mark C. Miller, Lawrence Livermore National Laboratory
email: mailto:miller86@llnl.gov
===
Also fixed to exit failure if no command option is given.
Tested: Jam
This commit is contained in:
@@ -170,7 +170,7 @@ static int parse_flag(const char* str_flag, unsigned *flag)
|
||||
return -1;
|
||||
}
|
||||
|
||||
*flag = fla;
|
||||
*flag = (*flag) | fla;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ main (int argc, const char *argv[])
|
||||
/* Check for no command line parameters */
|
||||
if(argc == 1) {
|
||||
usage();
|
||||
leave(EXIT_SUCCESS);
|
||||
leave(EXIT_FAILURE);
|
||||
} /* end if */
|
||||
|
||||
/* parse command line options */
|
||||
|
||||
Reference in New Issue
Block a user