|
@@ -5,7 +5,8 @@
|
5
|
5
|
#include <gpxe/settings_ui.h>
|
6
|
6
|
|
7
|
7
|
static int config_exec ( int argc, char **argv ) {
|
8
|
|
- struct settings *settings = NULL;
|
|
8
|
+ char *settings_name;
|
|
9
|
+ struct settings *settings;
|
9
|
10
|
int rc;
|
10
|
11
|
|
11
|
12
|
if ( argc > 2 ) {
|
|
@@ -14,12 +15,11 @@ static int config_exec ( int argc, char **argv ) {
|
14
|
15
|
return 1;
|
15
|
16
|
}
|
16
|
17
|
|
17
|
|
- if ( argc == 2 ) {
|
18
|
|
- settings = find_settings ( argv[1] );
|
19
|
|
- if ( ! settings ) {
|
20
|
|
- printf ( "No such scope \"%s\"\n", argv[1] );
|
21
|
|
- return 1;
|
22
|
|
- }
|
|
18
|
+ settings_name = ( ( argc == 2 ) ? argv[1] : "" );
|
|
19
|
+ settings = find_settings ( argv[1] );
|
|
20
|
+ if ( ! settings ) {
|
|
21
|
+ printf ( "No such scope \"%s\"\n", settings_name );
|
|
22
|
+ return 1;
|
23
|
23
|
}
|
24
|
24
|
|
25
|
25
|
if ( ( rc = settings_ui ( settings ) ) != 0 ) {
|