Revision 376253ec usb-bsd.c

b/usb-bsd.c
554 554
                            int speed)
555 555
{
556 556
    const char *class_str, *speed_str;
557
    Monitor *mon = cur_mon;
557 558

  
558 559
    switch(speed) {
559 560
    case USB_SPEED_LOW:
......
570 571
        break;
571 572
    }
572 573

  
573
    term_printf("  Device %d.%d, speed %s Mb/s\n",
574
                bus_num, addr, speed_str);
574
    monitor_printf(mon, "  Device %d.%d, speed %s Mb/s\n",
575
                   bus_num, addr, speed_str);
575 576
    class_str = usb_class_str(class_id);
576 577
    if (class_str)
577
        term_printf("    %s:", class_str);
578
        monitor_printf(mon, "    %s:", class_str);
578 579
    else
579
        term_printf("    Class %02x:", class_id);
580
    term_printf(" USB device %04x:%04x", vendor_id, product_id);
580
        monitor_printf(mon, "    Class %02x:", class_id);
581
    monitor_printf(mon, " USB device %04x:%04x", vendor_id, product_id);
581 582
    if (product_name[0] != '\0')
582
        term_printf(", %s", product_name);
583
    term_printf("\n");
583
        monitor_printf(mon, ", %s", product_name);
584
    monitor_printf(mon, "\n");
584 585
}
585 586

  
586
static int usb_host_info_device(void *opaque, int bus_num, int addr,
587
static int usb_host_info_device(void *opaque,
588
                                int bus_num, int addr,
587 589
                                int class_id,
588 590
                                int vendor_id, int product_id,
589 591
                                const char *product_name,
......
594 596
    return 0;
595 597
}
596 598

  
597
void usb_host_info(void)
599
void usb_host_info(Monitor *mon)
598 600
{
599 601
    usb_host_scan(NULL, usb_host_info_device);
600 602
}

Also available in: Unified diff