source: rtems/testsuites/libtests/monitor02/init.c @ 53aceab

4.115
Last change on this file since 53aceab was 53aceab, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/05/11 at 13:02:01

2011-12-05 Ralf Corsépius <ralf.corsepius@…>

  • monitor02/init.c: Remove re-declaration of rtems_shell_main_monitor.
  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  This is a simple test whose only purpose is to start the Monitor
3 *  task.  The Monitor task can be used to obtain information about
4 *  a variety of RTEMS objects.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifdef HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#define CONFIGURE_INIT
21#include "bsp.h"
22#include "system.h"
23
24#include <rtems/shell.h>
25#include <rtems/shellconfig.h>
26#define MAX_ARGS 128
27
28char        *Commands[] = {
29  "task",
30  "task 32",
31  NULL
32};
33rtems_task Init(
34  rtems_task_argument argument
35)
36{
37#if !BSP_SMALL_MEMORY
38  int                i;
39  int                argc;
40  char               *argv[MAX_ARGS];
41  char               tmp[256];
42
43  puts( "\n*** START OF MONITOR02 ***\n");
44
45  for (i=0; i < MAX_ARGS && Commands[i] ; i++) {
46    strcpy( tmp, Commands[i] );
47    if (!rtems_shell_make_args(tmp, &argc, argv, MAX_ARGS) ) {
48      printf( "===> %s\n", Commands[i] );
49      rtems_shell_main_monitor(argc, argv);
50    }
51  }
52  puts( "\n*** END OF MONITOR02 ***\n");
53#else
54  puts( "TARGET MEMORY TOO SMALL TO RUN\n\n");
55#endif
56  rtems_test_exit(0);
57}
Note: See TracBrowser for help on using the repository browser.