diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-02 18:54:57 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-02 18:54:57 +0200 |
| commit | 1a3a3a20773a5664c653a8aebcd10d288962285b (patch) | |
| tree | 8af03d6cc24613d105e9f0534d0fa95b2089b117 /kernel/shell.c | |
| parent | 3cf50b41a40f6c2bd824549104015f6d2f6799c0 (diff) | |
Improved directory structure.
Diffstat (limited to 'kernel/shell.c')
| -rw-r--r-- | kernel/shell.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/kernel/shell.c b/kernel/shell.c index aff2dc4..6a4a0aa 100644 --- a/kernel/shell.c +++ b/kernel/shell.c @@ -1,6 +1,8 @@ -#include "kernel.h" #include "interrupts.h" -#include "../lib/logger/log.h" // logger facilities +#include "lib/logger/log.h" // logger facilities +#include "lib/bool/bool.h" +#include "lib/int/stdint.h" + #define FOOLOS_MODULE_NAME "shell" #define COMMAND_LENGTH 255 @@ -40,16 +42,6 @@ void shell_backspace() } -int strcmp(char *b1, char *b2) -{ - int i=0; - while(b1[i]==b2[i]&&b1[i]!=0&&b2[i]!=0) i++; - - if(b1[i]==0&&b2[i]==0)return 1; - - return 0; -} - // TODO: EXECUTE LATER not inside INTERRUPT !!! void shell_execute() { @@ -57,24 +49,24 @@ void shell_execute() //scr_put_string(" processing command: "); //scr_put_string_nl(command); - if(1==strcmp(command,"TIME")) + if(1==strcmp(command,"TIME",0)) { log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"%d seconds passed since system start.",timer16); } - else if(1==strcmp(command,"EIGHT")) + else if(1==strcmp(command,"EIGHT",0)) { int_generate88(); } - else if(1==strcmp(command,"MEM")) + else if(1==strcmp(command,"MEM",0)) { mmap_show_free(); } - else if(1==strcmp(command,"ALLOC")) + else if(1==strcmp(command,"ALLOC",0)) { uint32_t *malloc= pmmngr_alloc_block(); log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"allocated 4KB block at: %08x.",malloc); } - else if(1==strcmp(command,"READ")) + else if(1==strcmp(command,"READ",0)) { uint8_t *read= flpydsk_read_sector (10); } |
