1
0
mirror of git://projects.qi-hardware.com/wernermisc.git synced 2024-11-14 19:33:44 +02:00

qpkg/qpkg.c (main): show usage if there are no arguments or any options

This commit is contained in:
Werner Almesberger 2010-11-19 14:21:55 -03:00
parent 43b9dc1972
commit c90fcba126

View File

@ -111,9 +111,13 @@ int main(int argc, char **argv)
{
int arg;
if (argc == 1)
usage(*argv);
packages = make_tree(comp_id);
versions = make_tree(comp_id);
for (arg = 1; arg != argc; arg++) {
if (*argv[arg] == '-')
usage(*argv);
if (!strcmp(argv[arg], "list")) {
switch (argc-arg) {
case 1: