summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2009-02-17 12:57:31 +0100
committerMichael Brown2009-02-17 12:57:31 +0100
commitbea828b9ed07a48d273e47c4fa434a1ee477becc (patch)
treeee32bb4ec6d4d685a26eb077c0688e740a334b3c
parent[http] Send authentication information whenever username is present (diff)
downloadipxe-bea828b9ed07a48d273e47c4fa434a1ee477becc.tar.gz
ipxe-bea828b9ed07a48d273e47c4fa434a1ee477becc.tar.xz
ipxe-bea828b9ed07a48d273e47c4fa434a1ee477becc.zip
[settings] Allow store_setting() to access the root settings block
-rw-r--r--src/core/settings.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/settings.c b/src/core/settings.c
index 29e56b32..f34eb664 100644
--- a/src/core/settings.c
+++ b/src/core/settings.c
@@ -284,7 +284,7 @@ struct settings * find_settings ( const char *name ) {
/**
* Store value of setting
*
- * @v settings Settings block
+ * @v settings Settings block, or NULL
* @v setting Setting to store
* @v data Setting data, or NULL to clear setting
* @v len Length of setting data
@@ -294,9 +294,9 @@ int store_setting ( struct settings *settings, struct setting *setting,
const void *data, size_t len ) {
int rc;
- /* Sanity check */
+ /* NULL settings implies storing into the global settings root */
if ( ! settings )
- return -ENODEV;
+ settings = &settings_root;
/* Store setting */
if ( ( rc = settings->op->store ( settings, setting,