2007-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>

* libmisc/Makefile.am, libmisc/shell/cat_file.c,
	libmisc/shell/shell_makeargs.c, libmisc/shell/shellconfig.h: Rename
	cmd_XXX.c to main_XXX.c. Add cpuuse and stackuse commands.
	* libmisc/shell/main_alias.c, libmisc/shell/main_cat.c,
	libmisc/shell/main_cd.c, libmisc/shell/main_chdir.c,
	libmisc/shell/main_chmod.c, libmisc/shell/main_chroot.c,
	libmisc/shell/main_cpuuse.c, libmisc/shell/main_date.c,
	libmisc/shell/main_dir.c, libmisc/shell/main_exit.c,
	libmisc/shell/main_help.c, libmisc/shell/main_id.c,
	libmisc/shell/main_logoff.c, libmisc/shell/main_ls.c,
	libmisc/shell/main_mallocdump.c, libmisc/shell/main_mdump.c,
	libmisc/shell/main_medit.c, libmisc/shell/main_mfill.c,
	libmisc/shell/main_mkdir.c, libmisc/shell/main_mmove.c,
	libmisc/shell/main_mwdump.c, libmisc/shell/main_pwd.c,
	libmisc/shell/main_rm.c, libmisc/shell/main_rmdir.c,
	libmisc/shell/main_stackuse.c, libmisc/shell/main_tty.c,
	libmisc/shell/main_umask.c, libmisc/shell/main_whoami.c: New files.
	* libmisc/shell/cmd_alias.c, libmisc/shell/cmd_cat.c,
	libmisc/shell/cmd_cd.c, libmisc/shell/cmd_chdir.c,
	libmisc/shell/cmd_chmod.c, libmisc/shell/cmd_chroot.c,
	libmisc/shell/cmd_date.c, libmisc/shell/cmd_dir.c,
	libmisc/shell/cmd_exit.c, libmisc/shell/cmd_help.c,
	libmisc/shell/cmd_id.c, libmisc/shell/cmd_logoff.c,
	libmisc/shell/cmd_ls.c, libmisc/shell/cmd_mallocdump.c,
	libmisc/shell/cmd_mdump.c, libmisc/shell/cmd_medit.c,
	libmisc/shell/cmd_mfill.c, libmisc/shell/cmd_mkdir.c,
	libmisc/shell/cmd_mmove.c, libmisc/shell/cmd_mwdump.c,
	libmisc/shell/cmd_pwd.c, libmisc/shell/cmd_rm.c,
	libmisc/shell/cmd_rmdir.c, libmisc/shell/cmd_tty.c,
	libmisc/shell/cmd_umask.c, libmisc/shell/cmd_whoami.c: Removed.
This commit is contained in:
Joel Sherrill
2007-12-14 21:50:01 +00:00
parent a3def3395b
commit 8fdadc839b
33 changed files with 151 additions and 15 deletions
+33
View File
@@ -1,3 +1,36 @@
2007-12-14 Joel Sherrill <joel.sherrill@oarcorp.com>
* libmisc/Makefile.am, libmisc/shell/cat_file.c,
libmisc/shell/shell_makeargs.c, libmisc/shell/shellconfig.h: Rename
cmd_XXX.c to main_XXX.c. Add cpuuse and stackuse commands.
* libmisc/shell/main_alias.c, libmisc/shell/main_cat.c,
libmisc/shell/main_cd.c, libmisc/shell/main_chdir.c,
libmisc/shell/main_chmod.c, libmisc/shell/main_chroot.c,
libmisc/shell/main_cpuuse.c, libmisc/shell/main_date.c,
libmisc/shell/main_dir.c, libmisc/shell/main_exit.c,
libmisc/shell/main_help.c, libmisc/shell/main_id.c,
libmisc/shell/main_logoff.c, libmisc/shell/main_ls.c,
libmisc/shell/main_mallocdump.c, libmisc/shell/main_mdump.c,
libmisc/shell/main_medit.c, libmisc/shell/main_mfill.c,
libmisc/shell/main_mkdir.c, libmisc/shell/main_mmove.c,
libmisc/shell/main_mwdump.c, libmisc/shell/main_pwd.c,
libmisc/shell/main_rm.c, libmisc/shell/main_rmdir.c,
libmisc/shell/main_stackuse.c, libmisc/shell/main_tty.c,
libmisc/shell/main_umask.c, libmisc/shell/main_whoami.c: New files.
* libmisc/shell/cmd_alias.c, libmisc/shell/cmd_cat.c,
libmisc/shell/cmd_cd.c, libmisc/shell/cmd_chdir.c,
libmisc/shell/cmd_chmod.c, libmisc/shell/cmd_chroot.c,
libmisc/shell/cmd_date.c, libmisc/shell/cmd_dir.c,
libmisc/shell/cmd_exit.c, libmisc/shell/cmd_help.c,
libmisc/shell/cmd_id.c, libmisc/shell/cmd_logoff.c,
libmisc/shell/cmd_ls.c, libmisc/shell/cmd_mallocdump.c,
libmisc/shell/cmd_mdump.c, libmisc/shell/cmd_medit.c,
libmisc/shell/cmd_mfill.c, libmisc/shell/cmd_mkdir.c,
libmisc/shell/cmd_mmove.c, libmisc/shell/cmd_mwdump.c,
libmisc/shell/cmd_pwd.c, libmisc/shell/cmd_rm.c,
libmisc/shell/cmd_rmdir.c, libmisc/shell/cmd_tty.c,
libmisc/shell/cmd_umask.c, libmisc/shell/cmd_whoami.c: Removed.
2007-12-14 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/Makefile.am: _Thread_Rotate_ready_queue is only used by ITRON
+13 -10
View File
@@ -64,16 +64,19 @@ libmw_fb_a_SOURCES = mw-fb/mw_fb.c mw-fb/mw_uid.c mw-fb/mw_fb.h \
if LIBSHELL
noinst_LIBRARIES += libshell.a
libshell_a_SOURCES = shell/cat_file.c shell/cmd_alias.c shell/cmd_cat.c \
shell/cmd_cd.c shell/cmd_chdir.c shell/cmd_chmod.c shell/cmd_chroot.c \
shell/cmd_date.c shell/cmd_dir.c shell/cmd_exit.c shell/cmd_help.c \
shell/cmd_id.c shell/cmd_logoff.c shell/cmd_ls.c shell/cmd_mallocdump.c \
shell/cmd_mdump.c shell/cmd_medit.c shell/cmd_mfill.c shell/cmd_mkdir.c \
shell/cmd_mmove.c shell/cmd_mwdump.c shell/cmd_pwd.c shell/cmd_rm.c \
shell/cmd_rmdir.c shell/cmds.c shell/cmd_tty.c shell/cmd_umask.c \
shell/cmd_whoami.c shell/internal.h shell/shell.c shell/shellconfig.c \
shell/shell_makeargs.c shell/shell_cmdset.c shell/write_file.c \
shell/shellconfig.h shell/shell.h shell/str2int.c
libshell_a_SOURCES = shell/cat_file.c shell/cmds.c shell/internal.h \
shell/main_alias.c shell/main_cat.c shell/main_cd.c \
shell/main_chdir.c shell/main_chmod.c shell/main_chroot.c \
shell/main_cpuuse.c shell/main_date.c shell/main_dir.c \
shell/main_exit.c shell/main_help.c shell/main_id.c \
shell/main_logoff.c shell/main_ls.c shell/main_mallocdump.c \
shell/main_mdump.c shell/main_medit.c shell/main_mfill.c \
shell/main_mkdir.c shell/main_mmove.c shell/main_mwdump.c \
shell/main_pwd.c shell/main_rm.c shell/main_rmdir.c shell/main_stackuse.c \
shell/main_tty.c shell/main_umask.c shell/main_whoami.c \
shell/shell.c shell/shell_cmdset.c shell/shellconfig.c \
shell/shellconfig.h shell/shell.h shell/shell_makeargs.c \
shell/str2int.c shell/write_file.c
endif
EXTRA_DIST += shell/README
+1 -3
View File
@@ -1,9 +1,7 @@
/*
*
* Instantatiate a new terminal shell.
* CAT Command Implementation
*
* Author:
*
* WORK: fernando.ruiz@ctv.es
* HOME: correo@fernando-ruiz.com
*
+42
View File
@@ -0,0 +1,42 @@
/*
* CPUUSE Command Implementation
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <rtems.h>
#include <rtems/cpuuse.h>
#include <rtems/shell.h>
#include "internal.h"
int main_cpuuse(int argc,char *argv[])
{
if ( argc >= 1 && !strcmp( argv[1], "-r" ) ) {
printf( "Resetting CPU Usage information\n" );
rtems_cpu_usage_reset();
} else
rtems_cpu_usage_report_with_plugin(stdout, (rtems_printk_plugin_t)fprintf);
return 0;
}
shell_cmd_t Shell_CPUUSE_Command = {
"cpuuse", /* name */
"[-r] print or reset per thread cpu usage", /* usage */
"rtems", /* topic */
main_cpuuse, /* command */
NULL, /* alias */
NULL /* next */
};
@@ -1,4 +1,6 @@
/*
* ID Command Implementation
*
* Author: Fernando RUIZ CASAS
* Work: fernando.ruiz@ctv.es
* Home: correo@fernando-ruiz.com
+41
View File
@@ -0,0 +1,41 @@
/*
* stackuse Command Implementation
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <rtems.h>
#include <rtems/stackchk.h>
#include <rtems/shell.h>
#include "internal.h"
int main_stackuse(int argc,char *argv[])
{
rtems_stack_checker_report_usage_with_plugin(
stdout,
(rtems_printk_plugin_t)fprintf
);
return 0;
}
shell_cmd_t Shell_STACKUSE_Command = {
"stackuse", /* name */
"print per thread stack usage", /* usage */
"rtems", /* topic */
main_stackuse, /* command */
NULL, /* alias */
NULL /* next */
};
+2
View File
@@ -1,4 +1,6 @@
/*
* Split string into argc/argv style argument list
*
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
+17 -2
View File
@@ -45,6 +45,9 @@ extern shell_cmd_t Shell_CAT_Command;
extern shell_cmd_t Shell_RM_Command;
extern shell_cmd_t Shell_UMASK_Command;
extern shell_cmd_t Shell_CPUUSE_Command;
extern shell_cmd_t Shell_STACKUSE_Command;
extern shell_cmd_t Shell_MALLOC_DUMP_Command;
extern shell_cmd_t *Shell_Initial_commands[];
@@ -59,8 +62,8 @@ extern shell_alias_t Shell_EXIT_Alias;
extern shell_alias_t *Shell_Initial_aliases[];
/*
* If we are configured to alias a command, then make sure the underlying command
* is configured.
* If we are configured to alias a command, then make sure the underlying
* command is configured.
*/
#if !defined(CONFIGURE_SHELL_COMMANDS_ALL)
@@ -203,6 +206,18 @@ extern shell_alias_t *Shell_Initial_aliases[];
&Shell_UMASK_Command,
#endif
/*
* RTEMS Related commands
*/
#if defined(CONFIGURE_SHELL_COMMANDS_ALL) || \
defined(CONFIGURE_SHELL_COMMAND_CPUUSE)
&Shell_CPUUSE_Command,
#endif
#if defined(CONFIGURE_SHELL_COMMANDS_ALL) || \
defined(CONFIGURE_SHELL_COMMAND_STACKUSE)
&Shell_STACKUSE_Command,
#endif
/*
* Malloc family commands
*/