diff options
author | Till Straumann <strauman@slac.stanford.edu> | 2009-04-23 04:33:50 +0000 |
---|---|---|
committer | Till Straumann <strauman@slac.stanford.edu> | 2009-04-23 04:33:50 +0000 |
commit | 82a7c8424e6f779b2c2d6214f6259139fd402dee (patch) | |
tree | 380be0987c24b6e7961ff8d66d59b398c368465f /bsd_eth_drivers | |
parent | - added ifmedia_removeall(). (diff) | |
download | libbsdport-82a7c8424e6f779b2c2d6214f6259139fd402dee.tar.bz2 |
- make entries in default driver table all weak aliases to
a sentinel. If the user decides only to link a subset of
driver the probe algorithm skips entries matching the
sentinel.
Diffstat (limited to 'bsd_eth_drivers')
-rw-r--r-- | bsd_eth_drivers/libbsdport/alldrv.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/bsd_eth_drivers/libbsdport/alldrv.c b/bsd_eth_drivers/libbsdport/alldrv.c index 76aac41..cd199fd 100644 --- a/bsd_eth_drivers/libbsdport/alldrv.c +++ b/bsd_eth_drivers/libbsdport/alldrv.c @@ -1,16 +1,39 @@ #include <stdio.h> #include "libbsdport_api.h" +#include "devicet.h" driver_t *libbsdport_netdriver_table_all[] = { - &libbsdport_bge_driver, &libbsdport_em_driver, &libbsdport_pcn_driver, &libbsdport_le_pci_driver, + &libbsdport_fxp_driver, + &libbsdport_bge_driver, &libbsdport_re_driver, 0 }; -/* weak alias defaults to a table that includes all currently supported drivers */ +driver_t libbsdport_null_driver = {0}; + +extern driver_t libbsdport_em_driver + __attribute__((weak,alias("libbsdport_null_driver"))); +extern driver_t libbsdport_pcn_driver + __attribute__((weak,alias("libbsdport_null_driver"))); +extern driver_t libbsdport_le_pci_driver + __attribute__((weak,alias("libbsdport_null_driver"))); +extern driver_t libbsdport_fxp_driver + __attribute__((weak,alias("libbsdport_null_driver"))); +extern driver_t libbsdport_bge_driver + __attribute__((weak,alias("libbsdport_null_driver"))); +extern driver_t libbsdport_re_driver + __attribute__((weak,alias("libbsdport_null_driver"))); + + +/* weak alias defaults to a table that includes + * all currently supported drivers. + * + * However, the individual entires are weak aliases + * themselves so that you don't have to link all drivers... + */ extern driver_t *libbsdport_netdriver_table [ sizeof(libbsdport_netdriver_table_all)/sizeof(libbsdport_netdriver_table_all[0]) |