summaryrefslogtreecommitdiffhomepage
path: root/contrib/lar/cli.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-04-06 22:58:44 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-04-06 22:58:44 +0000
commitacf5ea72c70ddbdb90b18a2ae1169ad82e455876 (patch)
tree072cc1d19061f8e557726a6c8a3efd04c2c072d1 /contrib/lar/cli.c
parentbf1cbdd8389d5e7067b03c1f10e9fbcb3756ccf4 (diff)
contrib/lar:
- fix short read of index table - properly handle errno by using errno.h - extend lar_find_archive() to take a base search path a second argument - extend cli.c to allow specifing the base search path - print index number in lar.pl
Diffstat (limited to 'contrib/lar/cli.c')
-rw-r--r--contrib/lar/cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/lar/cli.c b/contrib/lar/cli.c
index e8daf63a5..098f55d9d 100644
--- a/contrib/lar/cli.c
+++ b/contrib/lar/cli.c
@@ -30,13 +30,13 @@ int do_print_index( lar_archive *ar )
return 0;
}
-int do_require( const char *package )
+int do_require( const char *package, const char *path )
{
int stat = 1;
lar_archive *ar;
lar_member *mb;
- if( (ar = lar_find_archive(package)) != NULL )
+ if( (ar = lar_find_archive(package, path)) != NULL )
{
if( (mb = lar_find_member(ar, package)) != NULL )
{
@@ -78,7 +78,7 @@ int main( int argc, const char* argv[] )
break;
case 'r':
- stat = do_require(argv[2]);
+ stat = do_require(argv[2], argv[3]);
break;
}
@@ -88,7 +88,7 @@ int main( int argc, const char* argv[] )
{
printf("Usage:\n");
printf("\tlar show <archive> [<member>]\n");
- printf("\tlar require <package>\n");
+ printf("\tlar require <package> [<path>]\n");
return 1;
}