Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[settings] Allow "config" command to access root settings block
  • Loading branch information
Michael Brown committed Jul 8, 2008
1 parent dbe9269 commit 4847d97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/hci/commands/config_cmd.c
Expand Up @@ -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 ) {
Expand All @@ -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 ) {
Expand Down

0 comments on commit 4847d97

Please sign in to comment.