source: rtems/cpukit/libmisc/shell/main_cpuinfo.c @ 01cb554

5
Last change on this file since 01cb554 was 01cb554, checked in by Sebastian Huber <sebastian.huber@…>, on 04/12/16 at 05:31:01

shell: Add CPUINFO command

Update #2723.

  • Property mode set to 100644
File size: 813 bytes
Line 
1/*
2 * Copyright (c) 2016 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
6 *  82178 Puchheim
7 *  Germany
8 *  <rtems@embedded-brains.de>
9 *
10 * The license and distribution terms for this file may be
11 * found in the file LICENSE in this distribution or at
12 * http://www.rtems.org/license/LICENSE.
13 */
14
15#if HAVE_CONFIG_H
16  #include "config.h"
17#endif
18
19#include <rtems/shell.h>
20#include <rtems/shellconfig.h>
21#include <rtems/cpuuse.h>
22
23static int rtems_shell_main_cpuinfo(int argc, char **argv)
24{
25  rtems_printer printer;
26
27  rtems_print_printer_fprintf(&printer, stdout);
28  rtems_cpu_info_report(&printer);
29
30  return 0;
31}
32
33rtems_shell_cmd_t rtems_shell_CPUINFO_Command = {
34  .name = "cpuinfo",
35  .usage = "cpuinfo",
36  .topic = "rtems",
37  .command = rtems_shell_main_cpuinfo
38};
Note: See TracBrowser for help on using the repository browser.