Changeset 82a7c84 in libbsdport


Ignore:
Timestamp:
Apr 23, 2009, 4:33:50 AM (10 years ago)
Author:
Till Straumann <strauman@…>
Branches:
master
Children:
831a437
Parents:
b2b1e46
Message:
  • 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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • bsd_eth_drivers/libbsdport/alldrv.c

    rb2b1e46 r82a7c84  
    11#include <stdio.h>
    22#include "libbsdport_api.h"
     3#include "devicet.h"
    34
    45driver_t *libbsdport_netdriver_table_all[] = {
    5         &libbsdport_bge_driver,
    66        &libbsdport_em_driver,
    77        &libbsdport_pcn_driver,
    88        &libbsdport_le_pci_driver,
     9        &libbsdport_fxp_driver,
     10        &libbsdport_bge_driver,
    911        &libbsdport_re_driver,
    1012        0
    1113};
    1214
    13 /* weak alias defaults to a table that includes all currently supported drivers */
     15driver_t libbsdport_null_driver = {0};
     16
     17extern driver_t libbsdport_em_driver
     18        __attribute__((weak,alias("libbsdport_null_driver")));
     19extern driver_t libbsdport_pcn_driver
     20        __attribute__((weak,alias("libbsdport_null_driver")));
     21extern driver_t libbsdport_le_pci_driver
     22        __attribute__((weak,alias("libbsdport_null_driver")));
     23extern driver_t libbsdport_fxp_driver
     24        __attribute__((weak,alias("libbsdport_null_driver")));
     25extern driver_t libbsdport_bge_driver
     26        __attribute__((weak,alias("libbsdport_null_driver")));
     27extern driver_t libbsdport_re_driver
     28        __attribute__((weak,alias("libbsdport_null_driver")));
     29
     30
     31/* weak alias defaults to a table that includes
     32 * all currently supported drivers.
     33 *
     34 * However, the individual entires are weak aliases
     35 * themselves so that you don't have to link all drivers...
     36 */
    1437extern driver_t *libbsdport_netdriver_table
    1538        [
Note: See TracChangeset for help on using the changeset viewer.