4 #include <gpxe/tables.h>
6 static struct command cmd_start[0] __table_start ( commands );
7 static struct command cmd_end[0] __table_end ( commands );
11 static int cmd_help_exec ( int argc, char **argv ) {
16 printf("Available commands:\n\n exit - Exit the command line and boot\n");
18 for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
19 printf (" %s - %s\n", ccmd->name, ccmd->desc );
22 if(!strcmp(argv[1], "exit") || !strcmp(argv[1], "quit")){
23 printf("exit - Exit the command line and boot\n\nUsage:\n exit\n");
25 for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
26 if(!strcmp(ccmd->name, argv[1])){
28 printf ("%s - %s\n\nUsage:\n %s\n", ccmd->name, ccmd->desc, ccmd->usage );
33 printf("\"%s\" isn't compiled in (does it exist?).\n", argv[1]);
41 struct command help_command __command = {
43 .usage = "help <command>\n\nExample:\n help help\n",
44 .desc = "The help command",
45 .exec = cmd_help_exec,