aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/common/interp.c
diff options
context:
space:
mode:
authorMike Smith <msmith@FreeBSD.org>1998-10-21 20:07:05 +0000
committerMike Smith <msmith@FreeBSD.org>1998-10-21 20:07:05 +0000
commiteddbe21defcc1fa5ed173d5ebf60973496ccf15a (patch)
tree259b4fb92fe588a74e3d9dd9dc94a125a9066062 /sys/boot/common/interp.c
parent7a3f6274635568976fafb71d8616da066dcb57ed (diff)
downloadsrc-eddbe21defcc1fa5ed173d5ebf60973496ccf15a.tar.gz
src-eddbe21defcc1fa5ed173d5ebf60973496ccf15a.zip
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.
Notes
Notes: svn path=/head/; revision=40553
Diffstat (limited to 'sys/boot/common/interp.c')
-rw-r--r--sys/boot/common/interp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/boot/common/interp.c b/sys/boot/common/interp.c
index d24ed6e3182a..fca044a6f7c1 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);