diff --git a/kernel/kshell.c b/kernel/kshell.c index 0d99aff..1714060 100644 --- a/kernel/kshell.c +++ b/kernel/kshell.c @@ -4,6 +4,7 @@ This software is distributed under the GNU General Public License. See the file LICENSE for details. */ +#include "kernel/config.h" #include "kernel/types.h" #include "kernel/error.h" #include "kernel/ascii.h" @@ -22,6 +23,10 @@ See the file LICENSE for details. #include "bcache.h" #include "printf.h" +#ifdef KSHELL_EXT + #include "kshell_ext.c" +#endif + static int kshell_mount( const char *devname, int unit, const char *fs_type) { if(current->ktable[KNO_STDDIR]) { @@ -350,7 +355,12 @@ int kshell_execute(int argc, const char **argv) bcache_flush_all(); } else if(!strcmp(cmd, "help")) { printf("Kernel Shell Commands:\nrun \nstart \nkill \nreap \nwait\nlist\nautomount\nmount \numount\nformat \ninstall atapi ata \nmkdir \nremove time\nbcache_stats\nbcache_flush\nreboot\nhelp\n\n"); - } else { +#ifdef KSHELL_EXT_EXECUTE + #include "kshell_ext_execute.c" +#else + } +#endif + else { printf("%s: command not found\n", argv[0]); } return 0;