hdt: Handling CTRL+C
authorErwan Velu <erwan.velu@free.fr>
Wed, 18 Mar 2009 19:01:39 +0000 (20:01 +0100)
committerErwan Velu <erwan.velu@free.fr>
Wed, 18 Mar 2009 19:01:39 +0000 (20:01 +0100)
Impact: User can use the CTRL+C

Basic Ctrl+C implementation

com32/hdt/hdt-cli.c

index 08e0827..160089d 100644 (file)
@@ -261,6 +261,10 @@ void start_cli_mode(struct s_hardware *hardware)
                //fgets(cli_line, sizeof cli_line, stdin);
                current_key = get_key(stdin, 0);
                switch (current_key) {
+               case KEY_CTRL('c'):
+                       more_printf("\n");
+                       display_prompt(cli_line, &cli_mode, &cur_pos);
+                       break;
                case KEY_TAB:
                        break;
                case KEY_ENTER: