Преглед на файлове

Add "exit --help" to preempt the pedants.

tags/v0.9.3
Michael Brown преди 17 години
родител
ревизия
24f945edce
променени са 1 файла, в които са добавени 9 реда и са изтрити 2 реда
  1. 9
    2
      src/hci/shell.c

+ 9
- 2
src/hci/shell.c Целия файл

@@ -39,8 +39,15 @@ static const char shell_prompt[] = "gPXE> ";
39 39
 static int exit_flag = 0;
40 40
 
41 41
 /** "exit" command body */
42
-static int exit_exec ( int argc __unused, char **argv __unused ) {
43
-	exit_flag = 1;
42
+static int exit_exec ( int argc, char **argv __unused ) {
43
+
44
+	if ( argc == 1 ) {
45
+		exit_flag = 1;
46
+	} else {
47
+		printf ( "Usage: exit\n"
48
+			 "Exits the command shell\n" );
49
+	}
50
+
44 51
 	return 0;
45 52
 }
46 53
 

Loading…
Отказ
Запис