diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-04-06 22:58:44 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-04-06 22:58:44 +0000 |
commit | acf5ea72c70ddbdb90b18a2ae1169ad82e455876 (patch) | |
tree | 072cc1d19061f8e557726a6c8a3efd04c2c072d1 /contrib/lar/cli.c | |
parent | bf1cbdd8389d5e7067b03c1f10e9fbcb3756ccf4 (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.c | 8 |
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; } |