summaryrefslogtreecommitdiffstats
path: root/src/core/config.c
diff options
context:
space:
mode:
authorMichael Brown2005-04-12 18:48:45 +0200
committerMichael Brown2005-04-12 18:48:45 +0200
commit6f37dc410a69ccb2aabcde033b70e22f46e70769 (patch)
treeb76b76e432f4d29012be7ad372de940b39ceb1ae /src/core/config.c
parentNow obsolete. :) (diff)
downloadipxe-6f37dc410a69ccb2aabcde033b70e22f46e70769.tar.gz
ipxe-6f37dc410a69ccb2aabcde033b70e22f46e70769.tar.xz
ipxe-6f37dc410a69ccb2aabcde033b70e22f46e70769.zip
print_drivers() is now unified.
Diffstat (limited to 'src/core/config.c')
-rw-r--r--src/core/config.c73
1 files changed, 6 insertions, 67 deletions
diff --git a/src/core/config.c b/src/core/config.c
index 9407df18..591ccf45 100644
--- a/src/core/config.c
+++ b/src/core/config.c
@@ -5,17 +5,16 @@
* your option) any later version.
*/
-#include "etherboot.h"
-#include "nic.h"
-#include "console.h"
+#include "etherboot.h"
+#include "dev.h"
+#include "console.h"
#ifdef BUILD_SERIAL
-#include ".buildserial.h"
+#include ".buildserial.h"
#define xstr(s) str(s)
#define str(s) #s
#endif
-void print_config(void)
-{
+void print_config ( void ) {
printf( "Etherboot " VERSION
#ifdef BUILD_SERIAL
" [build "
@@ -26,12 +25,7 @@ void print_config(void)
#endif /* BUILD_SERIAL */
" (GPL) http://etherboot.org\n"
"Drivers: " );
-#ifdef CONFIG_PCI
- pci_enumerate();
-#endif
-#ifdef CONFIG_ISA
- isa_enumerate();
-#endif
+ print_drivers();
printf( " Images: "
#ifdef TAGGED_IMAGE
"NBI "
@@ -110,61 +104,6 @@ void print_config(void)
#endif
}
-static const char *driver_name[] = {
- "nic",
- "disk",
- "floppy",
-};
-
-int probe(struct dev *dev)
-{
- const char *type_name;
- type_name = "";
- if ((dev->type >= 0) &&
- ((unsigned)dev->type < sizeof(driver_name)/sizeof(driver_name[0]))) {
- type_name = driver_name[dev->type];
- }
- if (dev->how_probe == PROBE_FIRST) {
- dev->to_probe = PROBE_PCI;
- memset(&dev->state, 0, sizeof(dev->state));
- }
- if (dev->to_probe == PROBE_PCI) {
-#ifdef CONFIG_PCI
- dev->how_probe = pci_probe(dev, type_name);
-#else
- dev->how_probe = PROBE_FAILED;
-#endif
- if (dev->how_probe == PROBE_FAILED) {
- dev->to_probe = PROBE_ISA;
- }
- }
- if (dev->to_probe == PROBE_ISA) {
-#ifdef CONFIG_ISA
- dev->how_probe = isa_probe(dev, type_name);
-#else
- dev->how_probe = PROBE_FAILED;
-#endif
- if (dev->how_probe == PROBE_FAILED) {
- dev->to_probe = PROBE_NONE;
- }
- }
- if ((dev->to_probe != PROBE_PCI) &&
- (dev->to_probe != PROBE_ISA)) {
- dev->how_probe = PROBE_FAILED;
-
- }
- return dev->how_probe;
-}
-
-void disable(struct dev *dev)
-{
- if (dev->disable) {
- dev->disable(dev);
- dev->disable = 0;
- }
-}
-
-
/*
* Drag in all requested console types
*