cmdlinelib.c now calls system() rather than doing its own tokenisation
[people/mcb30/gpxe.git] / src / commandline / commands / help.c
1 #include <string.h>
2 #include <vsprintf.h>
3 #include <gpxe/tables.h>
4 #include <gpxe/command.h>
5
6 static struct command cmd_start[0] __table_start ( commands );
7 static struct command cmd_end[0] __table_end ( commands );
8
9 void help_req(){}
10
11 static int cmd_help_exec ( int argc, char **argv ) {
12
13         struct command *ccmd;
14         int unknown = 1;
15
16
17         printf("Available commands:\n\n  exit - Exit the command line and boot\n");
18
19         for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
20                 printf ("  %s\n", ccmd->name );
21         }
22
23         return 0;
24 }
25
26 struct command help_command __command = {
27         .name = "help",
28         .exec = cmd_help_exec,
29 };
30
31