diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2009-10-21 18:18:45 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2009-10-21 18:18:45 (GMT) |
commit | 651b125bbd881e8df8302e8d179a551033efe06e (patch) | |
tree | a0e79f3fb4ec7c90486e6b32e0933c9b55848bed /tools/h5copy | |
parent | c1219b534b2ad6b84c62d409a9ebf598410ebda5 (diff) | |
download | hdf5-651b125bbd881e8df8302e8d179a551033efe06e.zip hdf5-651b125bbd881e8df8302e8d179a551033efe06e.tar.gz hdf5-651b125bbd881e8df8302e8d179a551033efe06e.tar.bz2 |
[svn-r17714] 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
Diffstat (limited to 'tools/h5copy')
-rw-r--r-- | tools/h5copy/h5copy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/h5copy/h5copy.c b/tools/h5copy/h5copy.c index 3252e6a..f2a41ae 100644 --- a/tools/h5copy/h5copy.c +++ b/tools/h5copy/h5copy.c @@ -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 */ |