mirror of https://github.com/ipxe/ipxe.git
Tidy up some more output. The command-line code needs some severe
overhauling, but this is not the time to do it.pull/1/head
parent
e852f8e504
commit
c6060a8fea
|
@ -13,19 +13,19 @@ static int cmd_help_exec ( int argc, char **argv ) {
|
||||||
struct command *ccmd;
|
struct command *ccmd;
|
||||||
int unknown = 1;
|
int unknown = 1;
|
||||||
if(argc == 1){
|
if(argc == 1){
|
||||||
printf("Built in commands:\n\n\texit, quit\t\tExit the command line and boot\n\nCompiled in commands:\n\n");
|
printf("Available commands:\n\n exit - Exit the command line and boot\n");
|
||||||
|
|
||||||
for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
|
for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
|
||||||
printf ("\t%s\t\t%s\n", ccmd->name, ccmd->desc );
|
printf (" %s - %s\n", ccmd->name, ccmd->desc );
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if(!strcmp(argv[1], "exit") || !strcmp(argv[1], "quit")){
|
if(!strcmp(argv[1], "exit") || !strcmp(argv[1], "quit")){
|
||||||
printf("exit, quit - The quit command\n\nUsage:\nquit or exit\n\n\tExample:\n\t\texit\n");
|
printf("exit - Exit the command line and boot\n\nUsage:\n exit\n");
|
||||||
}else{
|
}else{
|
||||||
for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
|
for ( ccmd = cmd_start ; ccmd < cmd_end ; ccmd++ ) {
|
||||||
if(!strcmp(ccmd->name, argv[1])){
|
if(!strcmp(ccmd->name, argv[1])){
|
||||||
unknown = 0;
|
unknown = 0;
|
||||||
printf ("\t%s - %s\n\nUsage:\n%s\n", ccmd->name, ccmd->desc, ccmd->usage );
|
printf ("%s - %s\n\nUsage:\n %s\n", ccmd->name, ccmd->desc, ccmd->usage );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ static int cmd_help_exec ( int argc, char **argv ) {
|
||||||
|
|
||||||
struct command help_command __command = {
|
struct command help_command __command = {
|
||||||
.name = "help",
|
.name = "help",
|
||||||
.usage = "help <command>\n\n\tExample:\n\t\thelp help\n",
|
.usage = "help <command>\n\nExample:\n help help\n",
|
||||||
.desc = "The help command",
|
.desc = "The help command",
|
||||||
.exec = cmd_help_exec,
|
.exec = cmd_help_exec,
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ static int show_exec ( int argc, char **argv ) {
|
||||||
|
|
||||||
struct command show_command __command = {
|
struct command show_command __command = {
|
||||||
.name = "show",
|
.name = "show",
|
||||||
.usage = "show\n",
|
.usage = "show <identifier>\n",
|
||||||
.desc = "Show stored options",
|
.desc = "Show stored options",
|
||||||
.exec = show_exec,
|
.exec = show_exec,
|
||||||
};
|
};
|
||||||
|
@ -78,7 +78,7 @@ static int set_exec ( int argc, char **argv ) {
|
||||||
|
|
||||||
struct command set_command __command = {
|
struct command set_command __command = {
|
||||||
.name = "set",
|
.name = "set",
|
||||||
.usage = "set <option number> <option string>\n",
|
.usage = "set <identifier> <value>\n",
|
||||||
.desc = "Set stored option",
|
.desc = "Set stored option",
|
||||||
.exec = set_exec,
|
.exec = set_exec,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue