Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!husc6!bloom-beacon!gatech!emory!arnold From: arnold@emory.uucp (Arnold D. Robbins {EUCC}) Newsgroups: comp.bugs.4bsd Subject: /usr/ucb/systat does not allow access to subsystem commands Message-ID: <2181@emory.uucp> Date: Tue, 21-Jul-87 16:59:13 EDT Article-I.D.: emory.2181 Posted: Tue Jul 21 16:59:13 1987 Date-Received: Thu, 23-Jul-87 04:37:30 EDT Organization: Math & Computer Science, Emory University, Atlanta Lines: 54 Subject: /usr/ucb/systat does not allow access to subsystem commands Index: /usr/src/ucb/systat/cmds.c 4.3BSD Description: The command() routine never reaches the piece of code that checks if a command should be passed to the currently running "subsystem" of systat, e.g. iostat or vmstat. Any valid command for such a subsystem produces an ambiguous command error. Repeat-By: Run systat, give it the "iostat" command, and then the "numbers" command. Watch it complain. Fix: Apply the following patch: *** /tmp/,RCSt1011662 Tue Jul 21 16:45:33 1987 --- cmds.c Tue Jul 21 16:43:53 1987 *************** *** 88,94 **** } p = lookup(cmd); if (p == (struct cmdtab *)-1) { ! error("%s: Ambiguous command.", cmd); goto done; } if (p) { --- 88,99 ---- } p = lookup(cmd); if (p == (struct cmdtab *)-1) { ! if (curcmd->c_cmd == 0) ! error("%s: Ambiguous command.", cmd); ! else if ((*curcmd->c_cmd)(cmd, cp) == 0) ! error("%s: Unknown command.", cmd); ! /* else ! all ok */ goto done; } if (p) { *************** *** 118,125 **** status(); goto done; } - if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(cmd, cp)) - error("%s: Unknown command.", cmd); done: sigsetmask(omask); } --- 123,128 ---- -- Arnold Robbins ARPA, CSNET: arnold@emory.ARPA BITNET: arnold@emory UUCP: { decvax, gatech, sun!sunatl }!emory!arnold ONE-OF-THESE-DAYS: arnold@emory.mathcs.emory.edu