From 3c06277bbb6ea135e6a1daf22463a347fc7898c7 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 26 May 2009 11:05:58 +0100 Subject: [settings] Allow for arbitrarily-named settings This provides a mechanism for using arbitrarily-named variables within gPXE, using the existing syntax for settings. --- src/net/netdevice.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/net/netdevice.c') diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 1a68af2c4..77edbcd37 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; -- cgit v1.2.3-55-g7522