diff options
author | msmith <msmith@FreeBSD.org> | 1998-10-21 20:07:05 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-10-21 20:07:05 +0000 |
commit | 880061ca43c5eb7110f8b122628b447b5df729e9 (patch) | |
tree | c03d04e81f549d7c5f9fdd53d289b5ef2e77e1e7 /sys/boot/common/interp.c | |
parent | a9435964cae6bb08cf72cd42f4f2e90b5721bbcb (diff) | |
download | FreeBSD-src-880061ca43c5eb7110f8b122628b447b5df729e9.zip FreeBSD-src-880061ca43c5eb7110f8b122628b447b5df729e9.tar.gz |
Make ISA PnP work. This successfully enumerates as many ISA devices as I
can fit into my test machine.
- Move to using STAILQs rather than ad-hoc singly-linked lists.
- Use a mostly procedural interface to the PnP information. This
improves data-hiding.
Implement a new linker-set technique (currently on i386 only but should work
on Alpha as well). This is a good candidate for replacing the current
gensetdefs cruft completely.
Diffstat (limited to 'sys/boot/common/interp.c')
-rw-r--r-- | sys/boot/common/interp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/boot/common/interp.c b/sys/boot/common/interp.c index d24ed6e..fca044a 100644 --- a/sys/boot/common/interp.c +++ b/sys/boot/common/interp.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: interp.c,v 1.5 1998/10/07 02:38:26 msmith Exp $ + * $Id: interp.c,v 1.6 1998/10/09 07:09:22 msmith Exp $ */ /* * Simple commandline interpreter, toplevel and misc. @@ -58,10 +58,10 @@ perform(int argc, char *argv[]) cmd = NULL; result = CMD_ERROR; - cmdp = (struct bootblk_command **)Xcommand_set.ls_items; - for (i = 0; i < Xcommand_set.ls_length; i++) { - if ((cmdp[i]->c_name != NULL) && !strcmp(argv[0], cmdp[i]->c_name)) - cmd = cmdp[i]->c_fn; + /* search the command set for the command */ + SET_FOREACH(cmdp, Xcommand_set) { + if (((*cmdp)->c_name != NULL) && !strcmp(argv[0], (*cmdp)->c_name)) + cmd = (*cmdp)->c_fn; } if (cmd != NULL) { result = (cmd)(argc, argv); |