[settings] Apply settings block name in register_settings()

Pass the settings block name as a parameter to register_settings(),
rather than defining it with settings_init() (and then possibly
changing it by directly manipulating settings->name).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2010-12-01 16:35:00 +00:00
parent de6a59470b
commit 67b45186a5
10 changed files with 30 additions and 32 deletions
+2 -1
View File
@@ -66,7 +66,8 @@ void store_cached_dhcpack ( userptr_t data, size_t len ) {
* device, which is usually what we want.
*/
parent = netdev_settings ( last_opened_netdev() );
if ( ( rc = register_settings ( &dhcppkt->settings, parent ) ) != 0 )
if ( ( rc = register_settings ( &dhcppkt->settings, parent,
DHCP_SETTINGS_NAME ) ) != 0 )
DBG ( "DHCP could not register cached settings: %s\n",
strerror ( rc ) );