diff --git a/programs/system/shell/all.h b/programs/system/shell/all.h index 9f81ae058c..0fc156e0f3 100644 --- a/programs/system/shell/all.h +++ b/programs/system/shell/all.h @@ -35,8 +35,7 @@ #include "cmd/cmd_clear.c" #include "cmd/cmd_ccpuid.c" #include "cmd/cmd_sleep.c" -#include "cmd/cmd_turnoff.c" -#include "cmd/cmd_kerver.c" +#include "cmd/cmd_shutdown.c" #include "cmd/cmd_uptime.c" #include "modules/module_command.c" diff --git a/programs/system/shell/bin/eng/shell.kex b/programs/system/shell/bin/eng/shell.kex index 972ca8a24a..501e93f43b 100644 Binary files a/programs/system/shell/bin/eng/shell.kex and b/programs/system/shell/bin/eng/shell.kex differ diff --git a/programs/system/shell/bin/rus/shell.kex b/programs/system/shell/bin/rus/shell.kex index b3528929f8..e1e2c10abc 100644 Binary files a/programs/system/shell/bin/rus/shell.kex and b/programs/system/shell/bin/rus/shell.kex differ diff --git a/programs/system/shell/cmd/cmd_kerver.c b/programs/system/shell/cmd/cmd_kerver.c deleted file mode 100644 index 455319dc0c..0000000000 --- a/programs/system/shell/cmd/cmd_kerver.c +++ /dev/null @@ -1,27 +0,0 @@ -int cmd_kerver(char param[]) -{ -char *kvbuf; -char *vA, *vB, *vC, *vD; -unsigned *Rev; - -kvbuf = malloc(16); -kol_get_kernel_ver(kvbuf); -vA = kvbuf+0; -vA = *vA; -vB = kvbuf+1; -vB = *vB; -vC = kvbuf+2; -vC = *vC; -vD = kvbuf+3; -vD = *vD; -Rev = kvbuf+5; -Rev = *Rev; - -#if LANG_ENG - printf (" KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r", vA, vB, vC, vD, Rev); -#elif LANG_RUS - printf (" КолибриОС v%d.%d.%d.%d. SVN-рев. ядра: %d\n\r", vA, vB, vC, vD, Rev); -#endif -free(kvbuf); -return TRUE; -} \ No newline at end of file diff --git a/programs/system/shell/cmd/cmd_turnoff.c b/programs/system/shell/cmd/cmd_shutdown.c similarity index 50% rename from programs/system/shell/cmd/cmd_turnoff.c rename to programs/system/shell/cmd/cmd_shutdown.c index cb7d07e100..06ef8d1100 100644 --- a/programs/system/shell/cmd/cmd_turnoff.c +++ b/programs/system/shell/cmd/cmd_shutdown.c @@ -1,5 +1,5 @@ -int cmd_turnoff(char param[]) +int cmd_shutdown(char param[]) { kol_system_end(2); return TRUE; diff --git a/programs/system/shell/cmd/cmd_ver.c b/programs/system/shell/cmd/cmd_ver.c index c3056468a3..3c50031063 100644 --- a/programs/system/shell/cmd/cmd_ver.c +++ b/programs/system/shell/cmd/cmd_ver.c @@ -1,6 +1,36 @@ int cmd_ver(char param[]) { -printf (" %s\n\r", SHELL_VERSION); -return TRUE; +if (!strcmp(param, "kernel")) + { + char *kvbuf; + char *vA, *vB, *vC, *vD; + unsigned *Rev; + + kvbuf = malloc(16); + kol_get_kernel_ver(kvbuf); + vA = kvbuf+0; + vA = *vA; + vB = kvbuf+1; + vB = *vB; + vC = kvbuf+2; + vC = *vC; + vD = kvbuf+3; + vD = *vD; + Rev = kvbuf+5; + Rev = *Rev; + + #if LANG_ENG + printf (" KolibriOS v%d.%d.%d.%d. Kernel SVN-rev.: %d\n\r", vA, vB, vC, vD, Rev); + #elif LANG_RUS + printf (" КолибриОС v%d.%d.%d.%d. SVN-рев. ядра: %d\n\r", vA, vB, vC, vD, Rev); + #endif + free(kvbuf); + return TRUE; + } +else + { + printf (" Shell v%s\n\r", SHELL_VERSION); + return TRUE; + } } diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index fae15d122b..5d89084c81 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.4.5" +#define SHELL_VERSION "0.4.51" extern char PATH[256]; extern char PARAM[256]; @@ -63,8 +63,7 @@ int cmd_rmdir(char dir[]); int cmd_touch(char file[]); int cmd_ver(char arg[]); int cmd_sleep(char arg[]); -int cmd_turnoff(char arg[]); -int cmd_kerver(char arg[]); +int cmd_shutdown(char arg[]); int cmd_uptime(char param[]); /// =========================================================== diff --git a/programs/system/shell/locale/eng/globals.h b/programs/system/shell/locale/eng/globals.h index 08524e153b..be8bebcb51 100644 --- a/programs/system/shell/locale/eng/globals.h +++ b/programs/system/shell/locale/eng/globals.h @@ -1,28 +1,27 @@ const command_t COMMANDS[]= { - {"about", " Displays information about Shell\n\r", &cmd_about}, - {"alias", " Allows the user view the current aliases\n\r", &cmd_alias}, - {"ccpuid", " Displays CPU information\n\r", &cmd_ccpuid}, - {"cd", " Changes current directory. Usage:\n\r cd \n\r", &cmd_cd}, - {"clear", " Clears the screen\n\r", &cmd_clear}, - {"date", " Returns the current date and time\n\r", &cmd_date}, - {"echo", " Echoes the data to the screen. Usage:\n\r echo \n\r", &cmd_echo}, - {"exit", " Exits from Shell\n\r", &cmd_exit}, - {"memory", " Displays total, free and used memory\n\r", &cmd_memory}, - {"help", " Gives help on commands. Usage:\n\r help ;it lists all builtins\n\r help ;help on command\n\r", &cmd_help}, - {"kerver", " Displays the information about a version of KoOS kernel\n\r", &cmd_kerver}, - {"kill", " Stops a running process. Usage:\n\r kill \n\r", &cmd_kill}, - {"ls", " Lists the files in a directory. Usage:\n\r ls ;lists the files in current directory\n\r ls ;lists the files at specified folder\n\r", &cmd_ls}, - {"mkdir", " Makes directory. Usage:\n\r mkdir ;creates the folder in working directory\n\r mkdir ;create folder by specified path\n\r", &cmd_mkdir}, - {"more", " Displays a file data to the screen. Usage:\n\r more \n\r", &cmd_more}, - {"ps", " Lists the current processes running\n\r", &cmd_ps}, - {"pwd", " Displays the name of the working directory\n\r", &cmd_pwd}, - {"reboot", " Reboots the computer or KoOS kernel. Usage:\n\r reboot ;reboot a PC\n\r reboot kernel ;reboot the KoOS kernel\n\r", &cmd_reboot}, - {"rm", " Removes a file. Usage:\n\r rm file name>\n\r", &cmd_rm}, - {"rmdir", " Removes a folder. Usage:\n\r rmdir \n\r", &cmd_rmdir}, - {"sleep", " Stops the shell for the desired period. Usage:\n\r sleep