|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+#include <string.h>
|
|
|
2
|
+#include <vsprintf.h>
|
|
|
3
|
+#include <gpxe/command.h>
|
|
|
4
|
+#include <gpxe/settings.h>
|
|
|
5
|
+#include <gpxe/settings_ui.h>
|
|
|
6
|
+
|
|
|
7
|
+
|
|
|
8
|
+#include <gpxe/nvo.h>
|
|
|
9
|
+extern struct nvo_block *ugly_nvo_hack;
|
|
|
10
|
+
|
|
|
11
|
+
|
|
|
12
|
+static int config_exec ( int argc, char **argv ) {
|
|
|
13
|
+ struct config_context dummy_context;
|
|
|
14
|
+
|
|
|
15
|
+ if ( argc != 1 ) {
|
|
|
16
|
+ printf ( "Usage: %s\n"
|
|
|
17
|
+ "Opens the option configuration console\n", argv[0] );
|
|
|
18
|
+ return 1;
|
|
|
19
|
+ }
|
|
|
20
|
+
|
|
|
21
|
+ if ( ! ugly_nvo_hack ) {
|
|
|
22
|
+ printf ( "No non-volatile option storage available\n" );
|
|
|
23
|
+ return 1;
|
|
|
24
|
+ }
|
|
|
25
|
+
|
|
|
26
|
+ dummy_context.options = ugly_nvo_hack->options;
|
|
|
27
|
+ settings_ui ( &dummy_context );
|
|
|
28
|
+
|
|
|
29
|
+ return 0;
|
|
|
30
|
+}
|
|
|
31
|
+
|
|
|
32
|
+struct command config_command __command = {
|
|
|
33
|
+ .name = "config",
|
|
|
34
|
+ .exec = config_exec,
|
|
|
35
|
+};
|