19
19
** @contributors:
20
20
21
21
** Amanuel Bogale <amanuel2> : start
22
+ ** Ashish Ahuja <Fortunate-MAN>
22
23
**/
23
24
24
25
#include <stdio/stdio.h>
34
35
#include <drv/ps2/kbd/kbd.h>
35
36
#include <drv/cmos/rtc/rtc.h>
36
37
#include <../platform/pc/drv/ps2/kbd/kbd.c>
38
+ #include <var/cpu/cpu_info.h>
37
39
38
40
extern volatile bool TAB_PREVIOUS_VALUE_SET ;
39
41
extern volatile char * TAB_PREVIOUS_VALUE ;
@@ -50,6 +52,7 @@ volatile bool exit_set__shell = false;
50
52
volatile bool tab_multiple_opts = false;
51
53
volatile bool tab_one_opt = false;
52
54
volatile bool tab_zero_opt = false;
55
+ volatile bool exit_shell = false;
53
56
bool executed_internally = false;
54
57
55
58
void removeSpaces (char * source )
@@ -74,6 +77,7 @@ void loop_terminal()
74
77
printk ("%s release %s started at " , VAR_OSNAME , VAR_RELEASE );
75
78
start_time = rtc_get_time ();
76
79
rtc_print_struct (start_time );
80
+ //__debug_print_cpu_info();
77
81
while (1 )
78
82
{
79
83
start_shell :;
@@ -116,9 +120,12 @@ void loop_terminal()
116
120
scank (true, true, "%s" , cmd_active .value + (strlen (cmd_active .value )));
117
121
}
118
122
119
- if (strcmp (cmd_active .value , "exit" )== 0 )
123
+ if (strcmp (cmd_active .value , "exit" )== 0 || exit_set__shell == true)
124
+ //if (exit_set__shell == true)
120
125
{
121
126
shell_instance_cnt -- ;
127
+ exit_set__shell = false;
128
+ strcpy (cmd_active .value , " " );
122
129
printk ("Exited shell instance #%d\n" ,shell_instance_cnt + 1 );
123
130
goto end_shell ;
124
131
}
0 commit comments