Browse Source

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

tags/v0.9.3
Michael Brown 18 years ago
parent
commit
24f945edce
1 changed files with 9 additions and 2 deletions
  1. 9
    2
      src/hci/shell.c

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

39
 static int exit_flag = 0;
39
 static int exit_flag = 0;
40
 
40
 
41
 /** "exit" command body */
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
 	return 0;
51
 	return 0;
45
 }
52
 }
46
 
53
 

Loading…
Cancel
Save