Browse Source

[parseopt] Refer to online documentation for command help

The online documentation (e.g. http://ipxe.org/cmd/ifopen), though not
yet complete, is far more comprehensive than could be provided within
the iPXE binary.  Save around 200 bytes (compressed) by removing the
command descriptions from the interactive help, and instead referring
users directly to the web page describing the relevant command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
7d5dcc9299

+ 2
- 3
src/arch/i386/hci/commands/pxe_cmd.c View File

33
 /** "startpxe" command descriptor */
33
 /** "startpxe" command descriptor */
34
 static struct command_descriptor startpxe_cmd =
34
 static struct command_descriptor startpxe_cmd =
35
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
35
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
36
-		       "[<interface>]", "" );
36
+		       "[<interface>]" );
37
 
37
 
38
 /**
38
 /**
39
  * "startpxe" payload
39
  * "startpxe" payload
68
 
68
 
69
 /** "stoppxe" command descriptor */
69
 /** "stoppxe" command descriptor */
70
 static struct command_descriptor stoppxe_cmd =
70
 static struct command_descriptor stoppxe_cmd =
71
-	COMMAND_DESC ( struct stoppxe_options, stoppxe_opts, 0, 0,
72
-		       "", "" );
71
+	COMMAND_DESC ( struct stoppxe_options, stoppxe_opts, 0, 0, "" );
73
 
72
 
74
 /**
73
 /**
75
  * The "stoppxe" command
74
  * The "stoppxe" command

+ 1
- 1
src/arch/i386/hci/commands/reboot_cmd.c View File

36
 
36
 
37
 /** "reboot" command descriptor */
37
 /** "reboot" command descriptor */
38
 static struct command_descriptor reboot_cmd =
38
 static struct command_descriptor reboot_cmd =
39
-	COMMAND_DESC ( struct reboot_options, reboot_opts, 0, 0, "", "" );
39
+	COMMAND_DESC ( struct reboot_options, reboot_opts, 0, 0, "" );
40
 
40
 
41
 /**
41
 /**
42
  * The "reboot" command
42
  * The "reboot" command

+ 2
- 3
src/core/exec.c View File

298
 
298
 
299
 /** "exit" command descriptor */
299
 /** "exit" command descriptor */
300
 static struct command_descriptor exit_cmd =
300
 static struct command_descriptor exit_cmd =
301
-	COMMAND_DESC ( struct exit_options, exit_opts, 0, 1,
302
-		       "[<status>]", "" );
301
+	COMMAND_DESC ( struct exit_options, exit_opts, 0, 1, "[<status>]" );
303
 
302
 
304
 /**
303
 /**
305
  * "exit" command
304
  * "exit" command
344
 /** "isset" command descriptor */
343
 /** "isset" command descriptor */
345
 static struct command_descriptor isset_cmd =
344
 static struct command_descriptor isset_cmd =
346
 	COMMAND_DESC ( struct isset_options, isset_opts, 0, MAX_ARGUMENTS,
345
 	COMMAND_DESC ( struct isset_options, isset_opts, 0, MAX_ARGUMENTS,
347
-		       "[...]", "" );
346
+		       "[...]" );
348
 
347
 
349
 /**
348
 /**
350
  * "isset" command
349
  * "isset" command

+ 2
- 1
src/core/parseopt.c View File

132
  * @v argv		Argument list
132
  * @v argv		Argument list
133
  */
133
  */
134
 void print_usage ( struct command_descriptor *cmd, char **argv ) {
134
 void print_usage ( struct command_descriptor *cmd, char **argv ) {
135
-	printf ( "Usage:\n\n  %s %s\n", argv[0], cmd->usage_description );
135
+	printf ( "Usage:\n\n  %s %s\n\nSee http://ipxe.org/cmd/%s for further "
136
+		 "information\n", argv[0], cmd->usage, argv[0] );
136
 }
137
 }
137
 
138
 
138
 /**
139
 /**

+ 1
- 1
src/hci/commands/autoboot_cmd.c View File

35
 /** "autoboot" command descriptor */
35
 /** "autoboot" command descriptor */
36
 static struct command_descriptor autoboot_cmd =
36
 static struct command_descriptor autoboot_cmd =
37
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
37
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
38
-		       "[<interface>...]", "Attempt to boot the system" );
38
+		       "[<interface>...]" );
39
 
39
 
40
 /**
40
 /**
41
  * "autoboot" command
41
  * "autoboot" command

+ 1
- 3
src/hci/commands/config_cmd.c View File

41
 
41
 
42
 /** "config" command descriptor */
42
 /** "config" command descriptor */
43
 static struct command_descriptor config_cmd =
43
 static struct command_descriptor config_cmd =
44
-	COMMAND_DESC ( struct config_options, config_opts, 0, 1,
45
-		       "[<scope>]",
46
-		       "Open the option configuration console" );
44
+	COMMAND_DESC ( struct config_options, config_opts, 0, 1, "[<scope>]" );
47
 
45
 
48
 /**
46
 /**
49
  * Parse settings scope name
47
  * Parse settings scope name

+ 2
- 4
src/hci/commands/dhcp_cmd.c View File

43
 /** "dhcp" command descriptor */
43
 /** "dhcp" command descriptor */
44
 static struct command_descriptor dhcp_cmd =
44
 static struct command_descriptor dhcp_cmd =
45
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
45
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
46
-		       "[<interface>] [<interface>...]",
47
-		       "Configure network interface(s) using DHCP" );
46
+		       "[<interface>...]" );
48
 
47
 
49
 /**
48
 /**
50
  * Execute "dhcp" command for a network device
49
  * Execute "dhcp" command for a network device
88
 /** "pxebs" command descriptor */
87
 /** "pxebs" command descriptor */
89
 static struct command_descriptor pxebs_cmd =
88
 static struct command_descriptor pxebs_cmd =
90
 	COMMAND_DESC ( struct pxebs_options, pxebs_opts, 2, 2,
89
 	COMMAND_DESC ( struct pxebs_options, pxebs_opts, 2, 2,
91
-		       "<interface> <server_type>",
92
-		       "Perform PXE Boot Server discovery" );
90
+		       "<interface> <server type>" );
93
 
91
 
94
 /**
92
 /**
95
  * The "pxebs" command
93
  * The "pxebs" command

+ 1
- 2
src/hci/commands/digest_cmd.c View File

44
 /** "digest" command descriptor */
44
 /** "digest" command descriptor */
45
 static struct command_descriptor digest_cmd =
45
 static struct command_descriptor digest_cmd =
46
 	COMMAND_DESC ( struct digest_options, digest_opts, 1, MAX_ARGUMENTS,
46
 	COMMAND_DESC ( struct digest_options, digest_opts, 1, MAX_ARGUMENTS,
47
-		       "<image> [<image>...]",
48
-		       "Calculate the digest of an image" );
47
+		       "<image> [<image>...]" );
49
 
48
 
50
 /**
49
 /**
51
  * The "digest" command
50
  * The "digest" command

+ 2
- 3
src/hci/commands/fcmgmt_cmd.c View File

106
 
106
 
107
 /** "fcstat" command descriptor */
107
 /** "fcstat" command descriptor */
108
 static struct command_descriptor fcstat_cmd =
108
 static struct command_descriptor fcstat_cmd =
109
-	COMMAND_DESC ( struct fcstat_options, fcstat_opts, 0, 0,
110
-		       "", "" );
109
+	COMMAND_DESC ( struct fcstat_options, fcstat_opts, 0, 0, "" );
111
 
110
 
112
 /**
111
 /**
113
  * The "fcstat" command
112
  * The "fcstat" command
153
 /** "fcels" command descriptor */
152
 /** "fcels" command descriptor */
154
 static struct command_descriptor fcels_cmd =
153
 static struct command_descriptor fcels_cmd =
155
 	COMMAND_DESC ( struct fcels_options, fcels_opts, 1, 1,
154
 	COMMAND_DESC ( struct fcels_options, fcels_opts, 1, 1,
156
-		       "[--port <port>] [--id <peer_port_id>] <command>", "" );
155
+		       "[--port <port>] [--id <peer port id>] <request>" );
157
 
156
 
158
 /**
157
 /**
159
  * The "fcels" command
158
  * The "fcels" command

+ 1
- 6
src/hci/commands/gdbstub_cmd.c View File

65
 /** "gdbstub" command descriptor */
65
 /** "gdbstub" command descriptor */
66
 static struct command_descriptor gdbstub_cmd =
66
 static struct command_descriptor gdbstub_cmd =
67
 	COMMAND_DESC ( struct gdbstub_options, gdbstub_opts, 1, MAX_ARGUMENTS,
67
 	COMMAND_DESC ( struct gdbstub_options, gdbstub_opts, 1, MAX_ARGUMENTS,
68
-		       "<transport> [<options>...]",
69
-		       "Start remote debugging using one of the following "
70
-		       "transports:\n"
71
-		       "  serial           use serial port (if compiled in)\n"
72
-		       "  udp <interface>  use UDP over network interface "
73
-		       "(if compiled in)" );
68
+		       "<transport> [<options>...]" );
74
 
69
 
75
 /**
70
 /**
76
  * The "gdbstub" command
71
  * The "gdbstub" command

+ 3
- 6
src/hci/commands/ifmgmt_cmd.c View File

87
 /** "ifopen" command descriptor */
87
 /** "ifopen" command descriptor */
88
 static struct command_descriptor ifopen_cmd =
88
 static struct command_descriptor ifopen_cmd =
89
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
89
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
90
-		       "[<interface>...]",
91
-		       "Open network interface(s)" );
90
+		       "[<interface>...]" );
92
 
91
 
93
 /**
92
 /**
94
  * "ifopen" payload
93
  * "ifopen" payload
114
 /** "ifclose" command descriptor */
113
 /** "ifclose" command descriptor */
115
 static struct command_descriptor ifclose_cmd =
114
 static struct command_descriptor ifclose_cmd =
116
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
115
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
117
-		       "[<interface>...]",
118
-		       "Close network interface(s)" );
116
+		       "[<interface>...]" );
119
 
117
 
120
 /**
118
 /**
121
  * "ifclose" payload
119
  * "ifclose" payload
142
 /** "ifstat" command descriptor */
140
 /** "ifstat" command descriptor */
143
 static struct command_descriptor ifstat_cmd =
141
 static struct command_descriptor ifstat_cmd =
144
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
142
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
145
-		       "[<interface>...]",
146
-		       "Show network interface(s)" );
143
+		       "[<interface>...]" );
147
 
144
 
148
 /**
145
 /**
149
  * "ifstat" payload
146
  * "ifstat" payload

+ 8
- 14
src/hci/commands/image_cmd.c View File

84
 /** "imgfetch" command descriptor */
84
 /** "imgfetch" command descriptor */
85
 static struct command_descriptor imgfetch_cmd =
85
 static struct command_descriptor imgfetch_cmd =
86
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
86
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
87
-		       "[--name <name>] <image_url> [<arguments>...]",
88
-		       "Fetch image" );
87
+		       "[--name <name>] <uri> [<arguments>...]" );
89
 
88
 
90
 /** "kernel" command descriptor */
89
 /** "kernel" command descriptor */
91
 static struct command_descriptor kernel_cmd =
90
 static struct command_descriptor kernel_cmd =
92
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
91
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
93
-		       "[--name <name>] <image_url> [<arguments>...]",
94
-		       "Fetch and load image" );
92
+		       "[--name <name>] <uri> [<arguments>...]" );
95
 
93
 
96
 /** "chain" command descriptor */
94
 /** "chain" command descriptor */
97
 static struct command_descriptor chain_cmd =
95
 static struct command_descriptor chain_cmd =
98
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
96
 	COMMAND_DESC ( struct imgfetch_options, imgfetch_opts, 1, MAX_ARGUMENTS,
99
-		       "[--name <name>] <image_url> [<arguments>...]",
100
-		       "Fetch and execute image" );
97
+		       "[--name <name>] <uri> [<arguments>...]" );
101
 
98
 
102
 /**
99
 /**
103
  * The "imgfetch" and friends command body
100
  * The "imgfetch" and friends command body
200
 
197
 
201
 /** "imgload" command descriptor */
198
 /** "imgload" command descriptor */
202
 static struct command_descriptor imgload_cmd =
199
 static struct command_descriptor imgload_cmd =
203
-	COMMAND_DESC ( struct imgload_options, imgload_opts, 1, 1,
204
-		       "<image>", "Load image" );
200
+	COMMAND_DESC ( struct imgload_options, imgload_opts, 1, 1, "<image>" );
205
 
201
 
206
 /**
202
 /**
207
  * The "imgload" command
203
  * The "imgload" command
242
 /** "imgargs" command descriptor */
238
 /** "imgargs" command descriptor */
243
 static struct command_descriptor imgargs_cmd =
239
 static struct command_descriptor imgargs_cmd =
244
 	COMMAND_DESC ( struct imgargs_options, imgargs_opts, 1, MAX_ARGUMENTS,
240
 	COMMAND_DESC ( struct imgargs_options, imgargs_opts, 1, MAX_ARGUMENTS,
245
-		       "<image> [<arguments>...]",
246
-		       "Set arguments for image" );
241
+		       "<image> [<arguments>...]" );
247
 
242
 
248
 /**
243
 /**
249
  * The "imgargs" command body
244
  * The "imgargs" command body
282
 /** "imgexec" command descriptor */
277
 /** "imgexec" command descriptor */
283
 static struct command_descriptor imgexec_cmd =
278
 static struct command_descriptor imgexec_cmd =
284
 	COMMAND_DESC ( struct imgexec_options, imgexec_opts, 0, 1,
279
 	COMMAND_DESC ( struct imgexec_options, imgexec_opts, 0, 1,
285
-		       "[<image>]", "Execute image" );
280
+		       "[<image>]" );
286
 
281
 
287
 /**
282
 /**
288
  * The "imgexec" command
283
  * The "imgexec" command
330
 
325
 
331
 /** "imgstat" command descriptor */
326
 /** "imgstat" command descriptor */
332
 static struct command_descriptor imgstat_cmd =
327
 static struct command_descriptor imgstat_cmd =
333
-	COMMAND_DESC ( struct imgstat_options, imgstat_opts, 0, 0,
334
-		       "", "List images" );
328
+	COMMAND_DESC ( struct imgstat_options, imgstat_opts, 0, 0, "" );
335
 
329
 
336
 /**
330
 /**
337
  * The "imgstat" command
331
  * The "imgstat" command
366
 /** "imgfree" command descriptor */
360
 /** "imgfree" command descriptor */
367
 static struct command_descriptor imgfree_cmd =
361
 static struct command_descriptor imgfree_cmd =
368
 	COMMAND_DESC ( struct imgfree_options, imgfree_opts, 0, 1,
362
 	COMMAND_DESC ( struct imgfree_options, imgfree_opts, 0, 1,
369
-		       "[<image>]", "Free image(s)" );
363
+		       "[<image>]" );
370
 
364
 
371
 /**
365
 /**
372
  * The "imgfree" command
366
  * The "imgfree" command

+ 2
- 4
src/hci/commands/iwmgmt_cmd.c View File

34
 /** "iwstat" command descriptor */
34
 /** "iwstat" command descriptor */
35
 static struct command_descriptor iwstat_cmd =
35
 static struct command_descriptor iwstat_cmd =
36
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
36
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
37
-		       "[<interface>...]",
38
-		       "Show wireless interface(s)" );
37
+		       "[<interface>...]" );
39
 
38
 
40
 /**
39
 /**
41
  * "iwstat" payload
40
  * "iwstat" payload
66
 /** "iwlist" command descriptor */
65
 /** "iwlist" command descriptor */
67
 static struct command_descriptor iwlist_cmd =
66
 static struct command_descriptor iwlist_cmd =
68
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
67
 	COMMAND_DESC ( struct ifcommon_options, ifcommon_opts, 0, MAX_ARGUMENTS,
69
-		       "[<interface>...]",
70
-		       "List wireless networks" );
68
+		       "[<interface>...]" );
71
 
69
 
72
 /**
70
 /**
73
  * "iwlist" payload
71
  * "iwlist" payload

+ 1
- 2
src/hci/commands/login_cmd.c View File

38
 
38
 
39
 /** "login" command descriptor */
39
 /** "login" command descriptor */
40
 static struct command_descriptor login_cmd =
40
 static struct command_descriptor login_cmd =
41
-	COMMAND_DESC ( struct login_options, login_opts, 0, 0,
42
-		       "", "Prompt for login credentials" );
41
+	COMMAND_DESC ( struct login_options, login_opts, 0, 0, "" );
43
 
42
 
44
 /**
43
 /**
45
  * "login" command
44
  * "login" command

+ 2
- 2
src/hci/commands/lotest_cmd.c View File

49
 /** "lotest" command descriptor */
49
 /** "lotest" command descriptor */
50
 static struct command_descriptor lotest_cmd =
50
 static struct command_descriptor lotest_cmd =
51
 	COMMAND_DESC ( struct lotest_options, lotest_opts, 2, 2,
51
 	COMMAND_DESC ( struct lotest_options, lotest_opts, 2, 2,
52
-		       "[--mtu <mtu>] <sending_interface> "
53
-		       "<receiving_interface>", "" );
52
+		       "[--mtu <mtu>] <sending interface> "
53
+		       "<receiving interface>" );
54
 
54
 
55
 /**
55
 /**
56
  * "lotest" command
56
  * "lotest" command

+ 3
- 5
src/hci/commands/nvo_cmd.c View File

42
 
42
 
43
 /** "show" command descriptor */
43
 /** "show" command descriptor */
44
 static struct command_descriptor show_cmd =
44
 static struct command_descriptor show_cmd =
45
-	COMMAND_DESC ( struct show_options, show_opts, 1, 1,
46
-		       "<setting>", "" );
45
+	COMMAND_DESC ( struct show_options, show_opts, 1, 1, "<setting>" );
47
 
46
 
48
 /**
47
 /**
49
  * "show" command
48
  * "show" command
88
 /** "set" command descriptor */
87
 /** "set" command descriptor */
89
 static struct command_descriptor set_cmd =
88
 static struct command_descriptor set_cmd =
90
 	COMMAND_DESC ( struct set_options, set_opts, 1, MAX_ARGUMENTS,
89
 	COMMAND_DESC ( struct set_options, set_opts, 1, MAX_ARGUMENTS,
91
-		       "<setting> <value>", "" );
90
+		       "<setting> <value>" );
92
 
91
 
93
 /**
92
 /**
94
  * "set" command
93
  * "set" command
146
 
145
 
147
 /** "clear" command descriptor */
146
 /** "clear" command descriptor */
148
 static struct command_descriptor clear_cmd =
147
 static struct command_descriptor clear_cmd =
149
-	COMMAND_DESC ( struct clear_options, clear_opts, 1, 1,
150
-		       "<setting>", "" );
148
+	COMMAND_DESC ( struct clear_options, clear_opts, 1, 1, "<setting>" );
151
 
149
 
152
 /**
150
 /**
153
  * "clear" command
151
  * "clear" command

+ 1
- 2
src/hci/commands/route_cmd.c View File

38
 
38
 
39
 /** "route" command descriptor */
39
 /** "route" command descriptor */
40
 static struct command_descriptor route_cmd =
40
 static struct command_descriptor route_cmd =
41
-	COMMAND_DESC ( struct route_options, route_opts, 0, 0,
42
-		       "", "Display the routing table" );
41
+	COMMAND_DESC ( struct route_options, route_opts, 0, 0, "" );
43
 
42
 
44
 /**
43
 /**
45
  * The "route" command
44
  * The "route" command

+ 1
- 1
src/hci/commands/sanboot_cmd.c View File

42
 /** "sanboot" command descriptor */
42
 /** "sanboot" command descriptor */
43
 static struct command_descriptor sanboot_cmd =
43
 static struct command_descriptor sanboot_cmd =
44
 	COMMAND_DESC ( struct sanboot_options, sanboot_opts, 1, 1,
44
 	COMMAND_DESC ( struct sanboot_options, sanboot_opts, 1, 1,
45
-		       "<root-path>", "Boot from SAN target" );
45
+		       "<root-path>" );
46
 
46
 
47
 /**
47
 /**
48
  * The "sanboot" command
48
  * The "sanboot" command

+ 2
- 3
src/hci/commands/time_cmd.c View File

45
 /** "time" command descriptor */
45
 /** "time" command descriptor */
46
 static struct command_descriptor time_cmd =
46
 static struct command_descriptor time_cmd =
47
 	COMMAND_DESC ( struct time_options, time_opts, 1, MAX_ARGUMENTS,
47
 	COMMAND_DESC ( struct time_options, time_opts, 1, MAX_ARGUMENTS,
48
-		       "<command>", "Time a command" );
48
+		       "<command>" );
49
 
49
 
50
 /**
50
 /**
51
  * "time" command
51
  * "time" command
87
 
87
 
88
 /** "sleep" command descriptor */
88
 /** "sleep" command descriptor */
89
 static struct command_descriptor sleep_cmd =
89
 static struct command_descriptor sleep_cmd =
90
-	COMMAND_DESC ( struct sleep_options, sleep_opts, 1, 1,
91
-		       "<seconds>", "Sleep for <seconds> seconds" );
90
+	COMMAND_DESC ( struct sleep_options, sleep_opts, 1, 1, "<seconds>" );
92
 
91
 
93
 /**
92
 /**
94
  * "sleep" command
93
  * "sleep" command

+ 2
- 4
src/hci/commands/vlan_cmd.c View File

53
 static struct command_descriptor vcreate_cmd =
53
 static struct command_descriptor vcreate_cmd =
54
 	COMMAND_DESC ( struct vcreate_options, vcreate_opts, 1, 1,
54
 	COMMAND_DESC ( struct vcreate_options, vcreate_opts, 1, 1,
55
 		       "--tag <tag> [--priority <priority>] "
55
 		       "--tag <tag> [--priority <priority>] "
56
-		       "<trunk interface>",
57
-		       "Create a VLAN interface" );
56
+		       "<trunk interface>" );
58
 
57
 
59
 /**
58
 /**
60
  * "vcreate" command
59
  * "vcreate" command
95
 /** "vdestroy" command descriptor */
94
 /** "vdestroy" command descriptor */
96
 static struct command_descriptor vdestroy_cmd =
95
 static struct command_descriptor vdestroy_cmd =
97
 	COMMAND_DESC ( struct vdestroy_options, vdestroy_opts, 1, 1,
96
 	COMMAND_DESC ( struct vdestroy_options, vdestroy_opts, 1, 1,
98
-		       "<VLAN interface>",
99
-		       "Destroy a VLAN interface" );
97
+		       "<VLAN interface>" );
100
 
98
 
101
 /**
99
 /**
102
  * "vdestroy" command
100
  * "vdestroy" command

+ 1
- 2
src/hci/shell.c View File

97
 
97
 
98
 /** "shell" command descriptor */
98
 /** "shell" command descriptor */
99
 static struct command_descriptor shell_cmd =
99
 static struct command_descriptor shell_cmd =
100
-	COMMAND_DESC ( struct shell_options, shell_opts, 0, 0,
101
-		       "", "" );
100
+	COMMAND_DESC ( struct shell_options, shell_opts, 0, 0, "" );
102
 
101
 
103
 /**
102
 /**
104
  * "shell" command
103
  * "shell" command

+ 1
- 2
src/image/script.c View File

218
 
218
 
219
 /** "goto" command descriptor */
219
 /** "goto" command descriptor */
220
 static struct command_descriptor goto_cmd =
220
 static struct command_descriptor goto_cmd =
221
-	COMMAND_DESC ( struct goto_options, goto_opts, 1, 1,
222
-		       "<label>", "" );
221
+	COMMAND_DESC ( struct goto_options, goto_opts, 1, 1, "<label>" );
223
 
222
 
224
 /**
223
 /**
225
  * Current "goto" label
224
  * Current "goto" label

+ 4
- 6
src/include/ipxe/parseopt.h View File

81
 	uint8_t min_args;
81
 	uint8_t min_args;
82
 	/** Maximum number of non-option arguments */
82
 	/** Maximum number of non-option arguments */
83
 	uint8_t max_args;
83
 	uint8_t max_args;
84
-	/** Command usage and description
84
+	/** Command usage
85
 	 *
85
 	 *
86
 	 * This excludes the literal "Usage:" and the command name,
86
 	 * This excludes the literal "Usage:" and the command name,
87
 	 * which will be prepended automatically.
87
 	 * which will be prepended automatically.
88
 	 */
88
 	 */
89
-	const char *usage_description;
89
+	const char *usage;
90
 };
90
 };
91
 
91
 
92
 /** No maximum number of arguments */
92
 /** No maximum number of arguments */
99
  * @v _options		Option descriptor array
99
  * @v _options		Option descriptor array
100
  * @v _check_args	Remaining argument checker
100
  * @v _check_args	Remaining argument checker
101
  * @v _usage		Command usage
101
  * @v _usage		Command usage
102
- * @v _description	Command description
103
  * @ret _command	Command descriptor
102
  * @ret _command	Command descriptor
104
  */
103
  */
105
-#define COMMAND_DESC( _struct, _options, _min_args, _max_args, _usage,	      \
106
-		      _description )					      \
104
+#define COMMAND_DESC( _struct, _options, _min_args, _max_args, _usage )	      \
107
 	{								      \
105
 	{								      \
108
 		.options = ( ( ( ( typeof ( _options[0] ) * ) NULL ) ==	      \
106
 		.options = ( ( ( ( typeof ( _options[0] ) * ) NULL ) ==	      \
109
 			       ( ( struct option_descriptor * ) NULL ) ) ?    \
107
 			       ( ( struct option_descriptor * ) NULL ) ) ?    \
113
 		.len = sizeof ( _struct ),				      \
111
 		.len = sizeof ( _struct ),				      \
114
 		.min_args = _min_args,					      \
112
 		.min_args = _min_args,					      \
115
 		.max_args = _max_args,					      \
113
 		.max_args = _max_args,					      \
116
-		.usage_description = _usage "\n\n" _description,	      \
114
+		.usage = _usage,					      \
117
 	 }
115
 	 }
118
 
116
 
119
 extern int parse_string ( const char *text, const char **value );
117
 extern int parse_string ( const char *text, const char **value );

Loading…
Cancel
Save