Skip to content

Commit

Permalink
added shell handling for empty command entered
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvraj1803 committed Nov 15, 2023
1 parent 5ea4ec4 commit 0c65e9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ void main(void){

sse_init(); // Secure Storage Enclave


printf("\nPress Enter for Shell\n\n");

while(1){
__disable_irq();
schedule();
Expand Down
6 changes: 3 additions & 3 deletions shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static void add_shell_command(char command[], void (*command_handler)){

void shell_run(){
if(!SHELL_ACTIVE_BEFORE){
printf("\ndeltaV >>> ");
printf("deltaV >>> ");
SHELL_ACTIVE_BEFORE = 1;
}
char shell_input[CONFIG_MAX_SHELL_COMMAND_SIZE];
Expand All @@ -74,8 +74,8 @@ void shell_run(){
}
}

if(!command_recognised) printf("command not recognised.\n");
if(vm_connected_to_uart == VMID_SHELL) printf("\ndeltaV >>> ");
if(!command_recognised && strlen(shell_input)) printf("command not recognised.\n");
if(vm_connected_to_uart == VMID_SHELL) printf("deltaV >>> ");
}

void shell_init(){
Expand Down

0 comments on commit 0c65e9c

Please sign in to comment.