From 0a6c66a83018c64d961ee4e8601ae8950cbee00b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 29 Oct 2008 18:17:02 +0000 Subject: [settings] Add the notion of a "tag magic" to numbered settings Settings can be constructed using a dotted-decimal notation, to allow for access to unnamed settings. The default interpretation is as a DHCP option number (with encapsulated options represented as ".". In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to interpret the dotted-decimal notation as referring to non-DHCP options. In this case, it becomes necessary for these contexts to ignore standard DHCP options, otherwise we end up trying to, for example, retrieve the boot filename from SMBIOS. Allow settings blocks to specify a "tag magic". When dotted-decimal notation is used to construct a setting, the tag magic value of the originating settings block will be ORed in to the tag number. Store/fetch methods can then check for the magic number before interpreting arbitrarily-numbered settings. --- src/net/netdevice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/netdevice.c') diff --git a/src/net/netdevice.c b/src/net/netdevice.c index 6ea90b41b..81c4ae886 100644 --- a/src/net/netdevice.c +++ b/src/net/netdevice.c @@ -268,7 +268,7 @@ struct net_device * alloc_netdev ( size_t priv_size ) { INIT_LIST_HEAD ( &netdev->rx_queue ); settings_init ( netdev_settings ( netdev ), &netdev_settings_operations, &netdev->refcnt, - netdev->name ); + netdev->name, 0 ); netdev->priv = ( ( ( void * ) netdev ) + sizeof ( *netdev ) ); } return netdev; -- cgit v1.2.3-55-g7522