=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/Attic/cmds.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- src/usr.bin/systat/Attic/cmds.c 1996/05/22 11:35:30 1.2 +++ src/usr.bin/systat/Attic/cmds.c 1996/06/25 15:20:07 1.3 @@ -110,9 +110,7 @@ } p = lookup(cmd); if (p == (struct cmdtab *)-1) { - /* if not a primary command, try a display specific one */ - if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(cmd, cp)) - error("%s: Ambiguous command.", cmd); + error("%s: Ambiguous command.", cmd); goto done; } if (p) { @@ -142,6 +140,8 @@ status(); goto done; } + if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(cmd, cp)) + error("%s: Unknown command.", cmd); done: sigsetmask(omask); } @@ -170,7 +170,7 @@ nmatches++; } } - if (nmatches != 1) + if (nmatches > 1) return ((struct cmdtab *)-1); return (found); }