diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-04-06 02:50:29 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-04-06 02:50:29 +0000 |
commit | 1744f962b0c0d324aa9a5ebbbcfb4f98e312a217 (patch) | |
tree | b339843ddd72c882f146ec2330ea28f29ab95b27 /contrib/lar/cli.c | |
parent | 36a9415469571fa972b6ff9004401aee393d28ad (diff) |
contrib/lar: small fixes in cli.c
Diffstat (limited to 'contrib/lar/cli.c')
-rw-r--r-- | contrib/lar/cli.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/lar/cli.c b/contrib/lar/cli.c index 026150e79..2b5e08891 100644 --- a/contrib/lar/cli.c +++ b/contrib/lar/cli.c @@ -33,17 +33,19 @@ int do_print_index( lar_archive *ar ) int main( int argc, const char* argv[] ) { lar_archive *ar; - + int stat = 0; + if( argv[1] != NULL ) { if( (ar = lar_open(argv[1])) != NULL ) { if( argv[2] ) - return do_print_member(ar, argv[2]); + stat = do_print_member(ar, argv[2]); else - return do_print_index(ar); + stat = do_print_index(ar); lar_close(ar); + return stat; } else { @@ -51,7 +53,7 @@ int main( int argc, const char* argv[] ) } } else - { + { printf("Usage: lar <archive> [<member>]\n"); return 1; } |