qemu-tool.c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Compatibility for qemu-img/qemu-nbd
  3. *
  4. * Copyright IBM, Corp. 2008
  5. *
  6. * Authors:
  7. * Anthony Liguori <aliguori@us.ibm.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2. See
  10. * the COPYING file in the top-level directory.
  11. *
  12. * Contributions after 2012-01-13 are licensed under the terms of the
  13. * GNU GPL, version 2 or (at your option) any later version.
  14. */
  15. #include "qemu-common.h"
  16. #include "monitor.h"
  17. #include "qemu-timer.h"
  18. #include "qemu-log.h"
  19. #include "migration.h"
  20. #include "main-loop.h"
  21. #include "qemu_socket.h"
  22. #include "slirp/libslirp.h"
  23. #include <sys/time.h>
  24. FILE *logfile;
  25. struct QEMUBH
  26. {
  27. QEMUBHFunc *cb;
  28. void *opaque;
  29. };
  30. Monitor *cur_mon;
  31. int monitor_cur_is_qmp(void)
  32. {
  33. return 0;
  34. }
  35. void monitor_set_error(Monitor *mon, QError *qerror)
  36. {
  37. }
  38. void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
  39. {
  40. }
  41. void monitor_printf(Monitor *mon, const char *fmt, ...)
  42. {
  43. }
  44. void monitor_print_filename(Monitor *mon, const char *filename)
  45. {
  46. }
  47. void monitor_protocol_event(MonitorEvent event, QObject *data)
  48. {
  49. }
  50. int64_t cpu_get_clock(void)
  51. {
  52. return qemu_get_clock_ns(rt_clock);
  53. }
  54. int64_t cpu_get_icount(void)
  55. {
  56. abort();
  57. }
  58. void qemu_mutex_lock_iothread(void)
  59. {
  60. }
  61. void qemu_mutex_unlock_iothread(void)
  62. {
  63. }
  64. int use_icount;
  65. void qemu_clock_warp(QEMUClock *clock)
  66. {
  67. }
  68. int qemu_init_main_loop(void)
  69. {
  70. init_clocks();
  71. init_timer_alarm();
  72. return main_loop_init();
  73. }
  74. void slirp_update_timeout(uint32_t *timeout)
  75. {
  76. }
  77. void slirp_select_fill(int *pnfds, fd_set *readfds,
  78. fd_set *writefds, fd_set *xfds)
  79. {
  80. }
  81. void slirp_select_poll(fd_set *readfds, fd_set *writefds,
  82. fd_set *xfds, int select_error)
  83. {
  84. }
  85. void migrate_add_blocker(Error *reason)
  86. {
  87. }
  88. void migrate_del_blocker(Error *reason)
  89. {
  90. }