projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36a9415
)
contrib/lar: small fixes in cli.c
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 6 Apr 2009 02:50:29 +0000
(
02:50
+0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 6 Apr 2009 02:50:29 +0000
(
02:50
+0000)
contrib/lar/cli.c
patch
|
blob
|
history
diff --git
a/contrib/lar/cli.c
b/contrib/lar/cli.c
index 026150e79ed128702df7c71e3a871bba2cee04ef..2b5e08891274c0a5d0dd583819ebcb96a00ca92d 100644
(file)
--- 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;
}