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

5
Last change on this file since df91dd9 was f97536d, checked in by Sebastian Huber <sebastian.huber@…>, on 10/16/15 at 06:21:48

basdefs.h: Add and use RTEMS_UNUSED

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