| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | #ifdef HAVE_CONFIG_H1 |
| 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 | |
| 17 | void |
| 18 | rtems_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 | |
| 33 | void |
| 34 | rtems_monitor_part_dump_header( |
| 35 | bool_Bool verbose __attribute__((unused)) |
| 36 | ) |
| 37 | { |
| 38 | printf("\ |
| 39 | ID NAME ATTR STARTADDR LENGTH BUF_SIZE USED_BLOCKS\n"); |
| 40 | |
| 41 | |
| 42 | |
| 43 | rtems_monitor_separator(); |
| 44 | } |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | void |
| 50 | rtems_monitor_part_dump( |
| 51 | rtems_monitor_part_t *monitor_part, |
| 52 | bool_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); |
| Value stored to 'length' is never read |
| 70 | printf("\n"); |
| 71 | } |
| 72 | |