Changeset 20a3465 in mainline for uspace/app/usbinfo/dump.c


Ignore:
Timestamp:
2011-10-30T19:50:54Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3ce78580, 48902fa
Parents:
4c3ad56 (diff), 45bf63c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/dump.c

    r4c3ad56 r20a3465  
    110110}
    111111
    112 static void dump_tree_descriptor(uint8_t *descriptor, size_t depth)
     112static void dump_tree_descriptor(const uint8_t *descriptor, size_t depth)
    113113{
    114114        if (descriptor == NULL) {
    115115                return;
    116116        }
    117         int type = (int) *(descriptor + 1);
     117        int type = descriptor[1];
    118118        const char *name = "unknown";
    119119        switch (type) {
     
    136136}
    137137
    138 static void dump_tree_internal(usb_dp_parser_t *parser, usb_dp_parser_data_t *data,
    139     uint8_t *root, size_t depth)
     138static void dump_tree_internal(
     139    usb_dp_parser_t *parser, usb_dp_parser_data_t *data,
     140    const uint8_t *root, size_t depth)
    140141{
    141142        if (root == NULL) {
     
    143144        }
    144145        dump_tree_descriptor(root, depth);
    145         uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);
     146        const uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);
    146147        do {
    147148                dump_tree_internal(parser, data, child, depth + 1);
     
    152153static void dump_tree(usb_dp_parser_t *parser, usb_dp_parser_data_t *data)
    153154{
    154         uint8_t *ptr = data->data;
     155        const uint8_t *ptr = data->data;
    155156        printf("Descriptor tree:\n");
    156157        dump_tree_internal(parser, data, ptr, 0);
Note: See TracChangeset for help on using the changeset viewer.