Skip to content

Commit

Permalink
changed list() print format
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvraj1803 committed Nov 10, 2023
1 parent b3f41cb commit 7b357bf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions shell/shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "string.h"
#include "core/vm.h"
#include "drivers/uart.h"
#include "drivers/timer.h"
#include "stdlib.h"

// prototypes for shell commands
Expand Down Expand Up @@ -91,12 +92,9 @@ void shell_init(){
// ===================================== Shell Commands =================================================

void list(){
for(int vm=0;vm<total_vms;vm++){
printf("VMID: %d\n", vmlist[vm]->vmid);
printf("Name: %s\n", vmlist[vm]->name);
printf("State: %s\n", vm_state_to_string(vmlist[vm]->state));
printf("Size: %d\n", vmlist[vm]->vmdata_size);
printf("\n");
printf("VMID\tName\t\t\t\tState\tVirtual Time(ms)\n");
for(int vm=1;vm<total_vms;vm++){
printf("%d\t%s\t%s\t%d\n", vmlist[vm]->vmid,vmlist[vm]->name,vm_state_to_string(vmlist[vm]->state),get_virt_time(vmlist[vm]));
}
}

Expand Down

0 comments on commit 7b357bf

Please sign in to comment.