summaryrefslogtreecommitdiffstats
path: root/src/core/settings.c
diff options
context:
space:
mode:
authorMichael Brown2008-03-21 23:55:59 +0100
committerMichael Brown2008-03-21 23:55:59 +0100
commita462c96ffc1e7d378c783823f768a47d323dd210 (patch)
tree3b4dc63908ea6535b454be3e2af041782c0353ef /src/core/settings.c
parent[Settings] Migrate DHCP and NVO code to the new settings API (untested) (diff)
downloadipxe-a462c96ffc1e7d378c783823f768a47d323dd210.tar.gz
ipxe-a462c96ffc1e7d378c783823f768a47d323dd210.tar.xz
ipxe-a462c96ffc1e7d378c783823f768a47d323dd210.zip
[Settings] DHCP is now working using the new settings API.
Diffstat (limited to 'src/core/settings.c')
-rw-r--r--src/core/settings.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index cf0b898b..7dd697ed 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -91,13 +91,11 @@ int simple_settings_store ( struct settings *settings, unsigned int tag,
// Dummy routine just for testing
int simple_settings_fetch ( struct settings *settings, unsigned int tag,
void *data, size_t len ) {
- unsigned int i;
-
- DBGC ( settings, "Settings %p: fetch %s\n",
- settings, setting_tag_name ( tag ) );
- for ( i = 0 ; i < len ; i++ )
- *( ( ( uint8_t * ) data ) + i ) = i;
- return ( len ? len : 8 );
+ ( void ) settings;
+ ( void ) tag;
+ ( void ) data;
+ ( void ) len;
+ return -ENOENT;
}
/** Simple settings operations */
@@ -337,7 +335,7 @@ int fetch_setting ( struct settings *settings, unsigned int tag,
/* Recurse into each child block in turn */
list_for_each_entry ( child, &settings->children, siblings ) {
- if ( ( ret = fetch_setting ( settings, tag, data, len ) ) >= 0)
+ if ( ( ret = fetch_setting ( child, tag, data, len ) ) >= 0)
return ret;
}