summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown2008-07-08 03:10:18 +0200
committerMichael Brown2008-07-08 03:10:18 +0200
commit4847d9737290ff71c03a6b7c594793e63efe1714 (patch)
treecdc4f78253d8c011d5fb28343f7c86ceaaeb8ad2
parent[bzimage] Kill off the initrd image type (diff)
downloadipxe-4847d9737290ff71c03a6b7c594793e63efe1714.tar.gz
ipxe-4847d9737290ff71c03a6b7c594793e63efe1714.tar.xz
ipxe-4847d9737290ff71c03a6b7c594793e63efe1714.zip
[settings] Allow "config" command to access root settings block
-rw-r--r--src/hci/commands/config_cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/hci/commands/config_cmd.c b/src/hci/commands/config_cmd.c
index 5a34cea2..660c6423 100644
--- a/src/hci/commands/config_cmd.c
+++ b/src/hci/commands/config_cmd.c
@@ -5,7 +5,8 @@
#include <gpxe/settings_ui.h>
static int config_exec ( int argc, char **argv ) {
- struct settings *settings = NULL;
+ char *settings_name;
+ struct settings *settings;
int rc;
if ( argc > 2 ) {
@@ -14,12 +15,11 @@ static int config_exec ( int argc, char **argv ) {
return 1;
}
- if ( argc == 2 ) {
- settings = find_settings ( argv[1] );
- if ( ! settings ) {
- printf ( "No such scope \"%s\"\n", argv[1] );
- return 1;
- }
+ settings_name = ( ( argc == 2 ) ? argv[1] : "" );
+ settings = find_settings ( argv[1] );
+ if ( ! settings ) {
+ printf ( "No such scope \"%s\"\n", settings_name );
+ return 1;
}
if ( ( rc = settings_ui ( settings ) ) != 0 ) {