summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/commands.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-10-21 20:07:05 +0000
committermsmith <msmith@FreeBSD.org>1998-10-21 20:07:05 +0000
commit880061ca43c5eb7110f8b122628b447b5df729e9 (patch)
treec03d04e81f549d7c5f9fdd53d289b5ef2e77e1e7 /sys/boot/common/commands.c
parenta9435964cae6bb08cf72cd42f4f2e90b5721bbcb (diff)
downloadFreeBSD-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/commands.c')
-rw-r--r--sys/boot/common/commands.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/boot/common/commands.c b/sys/boot/common/commands.c
index 77cc43c..07b0ea8 100644
--- a/sys/boot/common/commands.c
+++ b/sys/boot/common/commands.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: commands.c,v 1.4 1998/10/07 02:38:26 msmith Exp $
+ * $Id: commands.c,v 1.5 1998/10/09 07:09:22 msmith Exp $
*/
#include <stand.h>
@@ -59,10 +59,10 @@ command_commandlist(int argc, char *argv[])
int i;
printf("Available commands:\n");
- cmdp = (struct bootblk_command **)Xcommand_set.ls_items;
- for (i = 0; i < Xcommand_set.ls_length; i++)
- if ((cmdp[i]->c_name != NULL) && (cmdp[i]->c_desc != NULL))
- printf(" %-15s %s\n", cmdp[i]->c_name, cmdp[i]->c_desc);
+ SET_FOREACH(cmdp, Xcommand_set) {
+ if (((*cmdp)->c_name != NULL) && ((*cmdp)->c_desc != NULL))
+ printf(" %-15s %s\n", (*cmdp)->c_name, (*cmdp)->c_desc);
+ }
return(CMD_OK);
}
OpenPOWER on IntegriCloud