source: rtems/cpukit/libmisc/monitor/mon-part.c @ bd5762d

4.104.114.95
Last change on this file since bd5762d was bd5762d, checked in by Joel Sherrill <joel.sherrill@…>, on 07/23/08 at 19:51:08

2008-07-23 Joel Sherrill <joel.sherrill@…>

  • libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-part.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c, libmisc/monitor/mon-region.c, libmisc/monitor/mon-sema.c, libmisc/monitor/mon-task.c, libmisc/monitor/monitor.h: Use rtems_object_get_name() instead of internal routine. This makes it possible to also print string names of POSIX objects. Adjust task report to realign since we can have longer names.
  • Property mode set to 100644
File size: 1.8 KB
Line 
1/*
2 * RTEMS Monitor partition support
3 *
4 *  $Id$
5 */
6
7#include <rtems.h>
8#include "monitor.h"
9#include <rtems/rtems/attr.inl>
10#include <stdio.h>
11#include <string.h>    /* memcpy() */
12
13void
14rtems_monitor_part_canonical(
15    rtems_monitor_part_t  *canonical_part,
16    void                  *part_void
17)
18{
19    Partition_Control *rtems_part = (Partition_Control *) part_void;
20
21    canonical_part->attribute = rtems_part->attribute_set;
22    canonical_part->start_addr = rtems_part->starting_address;
23    canonical_part->length = rtems_part->length;
24    canonical_part->buf_size = rtems_part->buffer_size;
25    canonical_part->used_blocks = rtems_part->number_of_used_blocks;
26}
27
28
29void
30rtems_monitor_part_dump_header(
31    boolean verbose
32)
33{
34    printf("\
35  ID       NAME   ATTR        STARTADDR LENGTH    BUF_SIZE  USED_BLOCKS\n");
36/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 1234
37          1         2         3         4         5         6         7    */
38           
39    rtems_monitor_separator();
40}
41
42/*
43 */
44
45void
46rtems_monitor_part_dump(
47    rtems_monitor_part_t *monitor_part,
48    boolean  verbose
49)
50{
51    int length = 0;
52
53    length += rtems_monitor_dump_id(monitor_part->id);
54    length += rtems_monitor_pad(11, length);
55    length += rtems_monitor_dump_name(monitor_part->id);
56    length += rtems_monitor_pad(18, length);
57    length += rtems_monitor_dump_attributes(monitor_part->attribute);
58    length += rtems_monitor_pad(30, length);
59    length += rtems_monitor_dump_hex((uint32_t)monitor_part->start_addr);
60    length += rtems_monitor_pad(40, length);
61    length += rtems_monitor_dump_hex(monitor_part->length);
62    length += rtems_monitor_pad(50, length);
63    length += rtems_monitor_dump_hex(monitor_part->buf_size);
64    length += rtems_monitor_pad(60, length);
65    length += rtems_monitor_dump_hex(monitor_part->used_blocks);
66    printf("\n");
67}
68
Note: See TracBrowser for help on using the repository browser.