diff options
author | Michael Brown | 2009-05-26 12:05:58 +0200 |
---|---|---|
committer | Michael Brown | 2009-05-26 12:05:58 +0200 |
commit | 3c06277bbb6ea135e6a1daf22463a347fc7898c7 (patch) | |
tree | 48469dfe123ab00d0e417535ac7ae7879e84ff24 /src/net/netdevice.c | |
parent | [multiboot] Include argv[0] as part of "command line" (diff) | |
download | ipxe-3c06277bbb6ea135e6a1daf22463a347fc7898c7.tar.gz ipxe-3c06277bbb6ea135e6a1daf22463a347fc7898c7.tar.xz ipxe-3c06277bbb6ea135e6a1daf22463a347fc7898c7.zip |
[settings] Allow for arbitrarily-named settings
This provides a mechanism for using arbitrarily-named variables within
gPXE, using the existing syntax for settings.
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r-- | src/net/netdevice.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 1a68af2c..77edbcd3 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -282,6 +282,7 @@ static void free_netdev ( struct refcnt *refcnt ) { netdev_tx_flush ( netdev ); netdev_rx_flush ( netdev ); + clear_settings ( netdev_settings ( netdev ) ); free ( netdev ); } @@ -303,9 +304,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 ( netdev ), - &netdev_settings_operations, &netdev->refcnt, - netdev->name, 0 ); + netdev_settings_init ( netdev ); netdev->priv = ( ( ( void * ) netdev ) + sizeof ( *netdev ) ); } return netdev; |