Changes in uspace/app/usbinfo/dump.c [7c95d6f5:b72efe8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dump.c
r7c95d6f5 rb72efe8 110 110 } 111 111 112 static void dump_tree_descriptor( constuint8_t *descriptor, size_t depth)112 static void dump_tree_descriptor(uint8_t *descriptor, size_t depth) 113 113 { 114 114 if (descriptor == NULL) { 115 115 return; 116 116 } 117 int type = descriptor[1];117 int type = (int) *(descriptor + 1); 118 118 const char *name = "unknown"; 119 119 switch (type) { … … 136 136 } 137 137 138 static void dump_tree_internal( 139 usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 140 const uint8_t *root, size_t depth) 138 static void dump_tree_internal(usb_dp_parser_t *parser, usb_dp_parser_data_t *data, 139 uint8_t *root, size_t depth) 141 140 { 142 141 if (root == NULL) { … … 144 143 } 145 144 dump_tree_descriptor(root, depth); 146 constuint8_t *child = usb_dp_get_nested_descriptor(parser, data, root);145 uint8_t *child = usb_dp_get_nested_descriptor(parser, data, root); 147 146 do { 148 147 dump_tree_internal(parser, data, child, depth + 1); … … 153 152 static void dump_tree(usb_dp_parser_t *parser, usb_dp_parser_data_t *data) 154 153 { 155 constuint8_t *ptr = data->data;154 uint8_t *ptr = data->data; 156 155 printf("Descriptor tree:\n"); 157 156 dump_tree_internal(parser, data, ptr, 0);
Note:
See TracChangeset
for help on using the changeset viewer.