diff options
author | Michael Brown | 2008-03-21 01:01:27 +0100 |
---|---|---|
committer | Michael Brown | 2008-03-21 01:01:27 +0100 |
commit | aec9b8a41b6cad1b257c4e3a7f043f35871aafd0 (patch) | |
tree | d75b982ed496f3f5142f5b6c02fcbd3cea868f6e /src/net/netdevice.c | |
parent | [Settings] Convert code in src/usr to use settings API. (diff) | |
download | ipxe-aec9b8a41b6cad1b257c4e3a7f043f35871aafd0.tar.gz ipxe-aec9b8a41b6cad1b257c4e3a7f043f35871aafd0.tar.xz ipxe-aec9b8a41b6cad1b257c4e3a7f043f35871aafd0.zip |
[Settings] Use a settings applicator to configure IPv4 routes.
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r-- | src/net/netdevice.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 323e9105..6875b3ba 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -266,7 +266,7 @@ struct net_device * alloc_netdev ( size_t priv_size ) { netdev->refcnt.free = free_netdev; INIT_LIST_HEAD ( &netdev->tx_queue ); INIT_LIST_HEAD ( &netdev->rx_queue ); - settings_init ( &netdev->settings, + settings_init ( netdev_settings ( netdev ), &netdev_settings_operations, &netdev->refcnt, netdev->name ); netdev->priv = ( ( ( void * ) netdev ) + sizeof ( *netdev ) ); @@ -292,7 +292,8 @@ int register_netdev ( struct net_device *netdev ) { ifindex++ ); /* Register per-netdev configuration settings */ - if ( ( rc = register_settings ( &netdev->settings, NULL ) ) != 0 ) { + if ( ( rc = register_settings ( netdev_settings ( netdev ), + NULL ) ) != 0 ) { DBGC ( netdev, "NETDEV %p could not register settings: %s\n", netdev, strerror ( rc ) ); return rc; @@ -369,7 +370,7 @@ void unregister_netdev ( struct net_device *netdev ) { netdev_close ( netdev ); /* Unregister per-netdev configuration settings */ - unregister_settings ( &netdev->settings ); + unregister_settings ( netdev_settings ( netdev ) ); /* Remove from device list */ list_del ( &netdev->list ); |