File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,6 @@ typedef struct {
77} command_t ;
88
99void shell_init (void );
10- void shell_on_input (void );
10+ void shell_on_input (int key );
1111
1212#endif
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ int vm_space_clone_cow(process_t* parent, process_t* child) {
3232 for (uint32_t i = 0 ; i < parent -> region_count ; ++ i ) {
3333 vm_region_t region = parent -> regions [i ];
3434 uint32_t size = region .end - region .start ;
35+ (void )size ;
3536 if (region .flags & VM_SHARED ) {
3637 if (!vm_map_shared (child , region .shared_id , region .start )) {
3738 return 0 ;
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ static char cmd_diag_name[] = "diag";
6969static char cmd_acpi_name [] = "acpi" ;
7070static char cmd_cpuinfo_name [] = "cpuinfo" ;
7171
72+ static void shell_redraw_line (void );
7273static void shell_putc (char ch );
7374static void shell_write (const char * str );
7475static void shell_prompt (void );
@@ -1435,9 +1436,9 @@ void shell_init(void) {
14351436 shell_prompt ();
14361437}
14371438
1438- void shell_on_input (void ) {
1439- char ch ;
1440- while ( keyboard_read_char ( & ch )) {
1439+ void shell_on_input (int key ) {
1440+ int ch = key ;
1441+ {
14411442 if (ch == 12 ) {
14421443 fb_clear (0 );
14431444 fb_console_init (0xFFFFFF , 0 );
@@ -1583,7 +1584,7 @@ void shell_on_input(void) {
15831584 for (uint32_t i = line_length ; i > cursor_pos ; -- i ) {
15841585 line_buffer [i ] = line_buffer [i - 1 ];
15851586 }
1586- line_buffer [cursor_pos ] = ch ;
1587+ line_buffer [cursor_pos ] = ( char ) ch ;
15871588 line_length ++ ;
15881589 cursor_pos ++ ;
15891590 shell_redraw_line ();
You can’t perform that action at this time.
0 commit comments