diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-05-01 17:20:39 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-05-01 19:52:12 +0100 |
commit | 15d2f947f51a0ea72e9938f5648fd5133950ecdb (patch) | |
tree | f53d0e87063b2c2972c3602ad8962332b3756a72 /src/net/netdev_settings.c | |
parent | b4ec6a6a687bd6e714e0dddcb8422cfe0d4195a1 (diff) | |
download | ipxe-15d2f947f51a0ea72e9938f5648fd5133950ecdb.tar.gz |
[settings] Eliminate settings "tag magic"
Create an explicit concept of "settings scope" and eliminate the magic
values used for numerical setting tags.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/netdev_settings.c')
-rw-r--r-- | src/net/netdev_settings.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/net/netdev_settings.c b/src/net/netdev_settings.c index 9efe6811c..8758e9800 100644 --- a/src/net/netdev_settings.c +++ b/src/net/netdev_settings.c @@ -39,30 +39,14 @@ struct setting mac_setting __setting ( SETTING_NETDEV ) = { .name = "mac", .description = "MAC address", .type = &setting_type_hex, - .tag = NETDEV_SETTING_TAG_MAC, }; struct setting busid_setting __setting ( SETTING_NETDEV ) = { .name = "busid", .description = "Bus ID", .type = &setting_type_hex, - .tag = NETDEV_SETTING_TAG_BUS_ID, }; /** - * Check applicability of network device setting - * - * @v settings Settings block - * @v setting Setting - * @ret applies Setting applies within this settings block - */ -static int netdev_applies ( struct settings *settings __unused, - struct setting *setting ) { - - return ( IS_NETDEV_SETTING_TAG ( setting->tag ) || - dhcpopt_applies ( setting->tag ) ); -} - -/** * Store value of network device setting * * @v settings Settings block @@ -134,7 +118,6 @@ static void netdev_clear ( struct settings *settings ) { /** Network device configuration settings operations */ struct settings_operations netdev_settings_operations = { - .applies = netdev_applies, .store = netdev_store, .fetch = netdev_fetch, .clear = netdev_clear, |