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

4.104.115
Last change on this file since 76282d5 was 76282d5, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/12/10 at 15:25:43

Use rtems_monitor_dump_addr instead of rtems_monitor_dump_hex
to print addresses.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 * RTEMS Monitor partition support
3 *
4 *  $Id$
5 */
6
7#ifdef HAVE_CONFIG_H
8#include "config.h"
9#endif
10
11#include <rtems.h>
12#include "monitor.h"
13#include <rtems/rtems/attr.inl>
14#include <stdio.h>
15#include <string.h>    /* memcpy() */
16
17void
18rtems_monitor_part_canonical(
19    rtems_monitor_part_t  *canonical_part,
20    void                  *part_void
21)
22{
23    Partition_Control *rtems_part = (Partition_Control *) part_void;
24
25    canonical_part->attribute = rtems_part->attribute_set;
26    canonical_part->start_addr = rtems_part->starting_address;
27    canonical_part->length = rtems_part->length;
28    canonical_part->buf_size = rtems_part->buffer_size;
29    canonical_part->used_blocks = rtems_part->number_of_used_blocks;
30}
31
32
33void
34rtems_monitor_part_dump_header(
35    bool verbose __attribute__((unused))
36)
37{
38    printf("\
39  ID       NAME   ATTR        STARTADDR LENGTH    BUF_SIZE  USED_BLOCKS\n");
40/*23456789 123456789 123456789 123456789 123456789 123456789 123456789 1234
41          1         2         3         4         5         6         7    */
42
43    rtems_monitor_separator();
44}
45
46/*
47 */
48
49void
50rtems_monitor_part_dump(
51    rtems_monitor_part_t *monitor_part,
52    bool  verbose __attribute__((unused))
53)
54{
55    int length = 0;
56
57    length += rtems_monitor_dump_id(monitor_part->id);
58    length += rtems_monitor_pad(11, length);
59    length += rtems_monitor_dump_name(monitor_part->id);
60    length += rtems_monitor_pad(18, length);
61    length += rtems_monitor_dump_attributes(monitor_part->attribute);
62    length += rtems_monitor_pad(30, length);
63    length += rtems_monitor_dump_addr(monitor_part->start_addr);
64    length += rtems_monitor_pad(40, length);
65    length += rtems_monitor_dump_hex(monitor_part->length);
66    length += rtems_monitor_pad(50, length);
67    length += rtems_monitor_dump_hex(monitor_part->buf_size);
68    length += rtems_monitor_pad(60, length);
69    length += rtems_monitor_dump_hex(monitor_part->used_blocks);
70    printf("\n");
71}
72
Note: See TracBrowser for help on using the repository browser.