Revision 376253ec vl.c

b/vl.c
31 31
#include "hw/baum.h"
32 32
#include "hw/bt.h"
33 33
#include "net.h"
34
#include "monitor.h"
34 35
#include "console.h"
35 36
#include "sysemu.h"
36 37
#include "gdbstub.h"
......
653 654
    return qemu_put_mouse_event_current->qemu_put_mouse_event_absolute;
654 655
}
655 656

  
656
void do_info_mice(void)
657
void do_info_mice(Monitor *mon)
657 658
{
658 659
    QEMUPutMouseEntry *cursor;
659 660
    int index = 0;
660 661

  
661 662
    if (!qemu_put_mouse_event_head) {
662
        term_printf("No mouse devices connected\n");
663
        monitor_printf(mon, "No mouse devices connected\n");
663 664
        return;
664 665
    }
665 666

  
666
    term_printf("Mouse devices available:\n");
667
    monitor_printf(mon, "Mouse devices available:\n");
667 668
    cursor = qemu_put_mouse_event_head;
668 669
    while (cursor != NULL) {
669
        term_printf("%c Mouse #%d: %s\n",
670
                    (cursor == qemu_put_mouse_event_current ? '*' : ' '),
671
                    index, cursor->qemu_put_mouse_event_name);
670
        monitor_printf(mon, "%c Mouse #%d: %s\n",
671
                       (cursor == qemu_put_mouse_event_current ? '*' : ' '),
672
                       index, cursor->qemu_put_mouse_event_name);
672 673
        index++;
673 674
        cursor = cursor->next;
674 675
    }
675 676
}
676 677

  
677
void do_mouse_set(int index)
678
void do_mouse_set(Monitor *mon, int index)
678 679
{
679 680
    QEMUPutMouseEntry *cursor;
680 681
    int i = 0;
681 682

  
682 683
    if (!qemu_put_mouse_event_head) {
683
        term_printf("No mouse devices connected\n");
684
        monitor_printf(mon, "No mouse devices connected\n");
684 685
        return;
685 686
    }
686 687

  
......
693 694
    if (cursor != NULL)
694 695
        qemu_put_mouse_event_current = cursor;
695 696
    else
696
        term_printf("Mouse at given index not found\n");
697
        monitor_printf(mon, "Mouse at given index not found\n");
697 698
}
698 699

  
699 700
/* compute with 96 bit intermediate result: (a*b)/c */
......
2697 2698
        if (bdrv_key_required(bs)) {
2698 2699
            autostart = 0;
2699 2700
            if (is_hotplug) {
2700
                monitor_read_bdrv_key_start(bs, usb_msd_password_cb, dev);
2701
                monitor_read_bdrv_key_start(cur_mon, bs, usb_msd_password_cb,
2702
                                            dev);
2701 2703
                return 0;
2702 2704
            }
2703 2705
        }
......
2779 2781
    return usb_device_del_addr(bus_num, addr);
2780 2782
}
2781 2783

  
2782
void do_usb_add(const char *devname)
2784
void do_usb_add(Monitor *mon, const char *devname)
2783 2785
{
2784 2786
    usb_device_add(devname, 1);
2785 2787
}
2786 2788

  
2787
void do_usb_del(const char *devname)
2789
void do_usb_del(Monitor *mon, const char *devname)
2788 2790
{
2789 2791
    usb_device_del(devname);
2790 2792
}
2791 2793

  
2792
void usb_info(void)
2794
void usb_info(Monitor *mon)
2793 2795
{
2794 2796
    USBDevice *dev;
2795 2797
    USBPort *port;
2796 2798
    const char *speed_str;
2797 2799

  
2798 2800
    if (!usb_enabled) {
2799
        term_printf("USB support not enabled\n");
2801
        monitor_printf(mon, "USB support not enabled\n");
2800 2802
        return;
2801 2803
    }
2802 2804

  
......
2818 2820
            speed_str = "?";
2819 2821
            break;
2820 2822
        }
2821
        term_printf("  Device %d.%d, Speed %s Mb/s, Product %s\n",
2822
                    0, dev->addr, speed_str, dev->devname);
2823
        monitor_printf(mon, "  Device %d.%d, Speed %s Mb/s, Product %s\n",
2824
                       0, dev->addr, speed_str, dev->devname);
2823 2825
    }
2824 2826
}
2825 2827

  
......
2853 2855
        }
2854 2856
}
2855 2857

  
2856
void pcmcia_info(void)
2858
void pcmcia_info(Monitor *mon)
2857 2859
{
2858 2860
    struct pcmcia_socket_entry_s *iter;
2861

  
2859 2862
    if (!pcmcia_sockets)
2860
        term_printf("No PCMCIA sockets\n");
2863
        monitor_printf(mon, "No PCMCIA sockets\n");
2861 2864

  
2862 2865
    for (iter = pcmcia_sockets; iter; iter = iter->next)
2863
        term_printf("%s: %s\n", iter->socket->slot_string,
2864
                    iter->socket->attached ? iter->socket->card_string :
2865
                    "Empty");
2866
        monitor_printf(mon, "%s: %s\n", iter->socket->slot_string,
2867
                       iter->socket->attached ? iter->socket->card_string :
2868
                       "Empty");
2866 2869
}
2867 2870

  
2868 2871
/***********************************************************/
......
5726 5729
#endif
5727 5730

  
5728 5731
    if (loadvm)
5729
        do_loadvm(loadvm);
5732
        do_loadvm(cur_mon, loadvm);
5730 5733

  
5731 5734
    if (incoming) {
5732 5735
        autostart = 0; /* fixme how to deal with -daemonize */

Also available in: Unified diff