Commit 5708fc66 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

stubs: fully replace qemu-tool.c and qemu-user.c


Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 4d454574
......@@ -171,7 +171,7 @@ install-libcacard: libcacard.la
qemu-img.o: qemu-img-cmds.h
tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \
tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-timer.o \
main-loop.o iohandler.o error.o
tools-obj-$(CONFIG_POSIX) += compatfd.o
......
......@@ -130,7 +130,6 @@ user-obj-y += envlist.o path.o
user-obj-y += tcg-runtime.o host-utils.o
user-obj-y += cache-utils.o
user-obj-y += module.o
user-obj-y += qemu-user.o
user-obj-y += qom/
######################################################################
......@@ -171,7 +170,7 @@ universal-obj-y += $(qapi-obj-y)
######################################################################
# guest agent
qga-obj-y = qga/ module.o qemu-tool.o
qga-obj-y = qga/ module.o
qga-obj-$(CONFIG_POSIX) += qemu-sockets.o qemu-option.o
vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
......
......@@ -78,7 +78,7 @@ DEFINE_TLS(CPUArchState *,cpu_single_env);
/* 0 = Do not count executed instructions.
1 = Precise instruction counting.
2 = Adaptive rate instruction counting. */
int use_icount = 0;
int use_icount;
#if !defined(CONFIG_USER_ONLY)
......
/*
* Compatibility for qemu-img/qemu-nbd
*
* Copyright IBM, Corp. 2008
*
* Authors:
* Anthony Liguori <aliguori@us.ibm.com>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Contributions after 2012-01-13 are licensed under the terms of the
* GNU GPL, version 2 or (at your option) any later version.
*/
#include "qemu-common.h"
#include "monitor/monitor.h"
#include "qemu/timer.h"
#include "qemu/log.h"
#include "migration/migration.h"
#include "qemu/main-loop.h"
#include "sysemu/sysemu.h"
#include "qemu/sockets.h"
#include "slirp/libslirp.h"
#include <sys/time.h>
struct QEMUBH
{
QEMUBHFunc *cb;
void *opaque;
};
const char *qemu_get_vm_name(void)
{
return NULL;
}
Monitor *cur_mon;
void vm_stop(RunState state)
{
abort();
}
int monitor_cur_is_qmp(void)
{
return 0;
}
void monitor_set_error(Monitor *mon, QError *qerror)
{
}
void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
{
}
void monitor_printf(Monitor *mon, const char *fmt, ...)
{
}
void monitor_print_filename(Monitor *mon, const char *filename)
{
}
void monitor_protocol_event(MonitorEvent event, QObject *data)
{
}
int64_t cpu_get_clock(void)
{
return get_clock_realtime();
}
int64_t cpu_get_icount(void)
{
abort();
}
void qemu_mutex_lock_iothread(void)
{
}
void qemu_mutex_unlock_iothread(void)
{
}
int use_icount;
void qemu_clock_warp(QEMUClock *clock)
{
}
void slirp_update_timeout(uint32_t *timeout)
{
}
void slirp_select_fill(int *pnfds, fd_set *readfds,
fd_set *writefds, fd_set *xfds)
{
}
void slirp_select_poll(fd_set *readfds, fd_set *writefds,
fd_set *xfds, int select_error)
{
}
void migrate_add_blocker(Error *reason)
{
}
void migrate_del_blocker(Error *reason)
{
}
/*
* Stubs for QEMU user emulation
*
* Copyright (c) 2012 SUSE LINUX Products GmbH
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see
* <http://www.gnu.org/licenses/gpl-2.0.html>
*/
#include "qemu-common.h"
#include "monitor/monitor.h"
Monitor *cur_mon;
int monitor_cur_is_qmp(void)
{
return 0;
}
void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
{
}
void monitor_set_error(Monitor *mon, QError *qerror)
{
}
stub-obj-y += arch-query-cpu-def.o
stub-obj-y += clock-warp.o
stub-obj-y += cpu-get-clock.o
stub-obj-y += cpu-get-icount.o
stub-obj-y += fdset-add-fd.o
stub-obj-y += fdset-find-fd.o
stub-obj-y += fdset-get-fd.o
stub-obj-y += fdset-remove-fd.o
stub-obj-y += get-fd.o
stub-obj-y += set-fd-handler.o
stub-obj-y += get-vm-name.o
stub-obj-y += iothread-lock.o
stub-obj-y += migr-blocker.o
stub-obj-y += mon-is-qmp.o
stub-obj-y += mon-printf.o
stub-obj-y += mon-print-filename.o
stub-obj-y += mon-protocol-event.o
stub-obj-y += mon-set-error.o
stub-obj-y += reset.o
stub-obj-y += vmstate.o
stub-obj-y += set-fd-handler.o
stub-obj-y += slirp.o
stub-obj-y += sysbus.o
stub-obj-y += vm-stop.o
stub-obj-y += vmstate.o
stub-obj-$(CONFIG_WIN32) += fd-register.o
#include "qemu-common.h"
#include "qemu/timer.h"
void qemu_clock_warp(QEMUClock *clock)
{
}
#include "qemu-common.h"
#include "qemu/timer.h"
int64_t cpu_get_clock(void)
{
return get_clock_realtime();
}
#include "qemu-common.h"
#include "qemu/timer.h"
int use_icount;
int64_t cpu_get_icount(void)
{
abort();
}
#include "qemu-common.h"
const char *qemu_get_vm_name(void)
{
return NULL;
}
#include "qemu-common.h"
#include "qemu/main-loop.h"
void qemu_mutex_lock_iothread(void)
{
}
void qemu_mutex_unlock_iothread(void)
{
}
#include "qemu-common.h"
#include "migration/migration.h"
void migrate_add_blocker(Error *reason)
{
}
void migrate_del_blocker(Error *reason)
{
}
#include "qemu-common.h"
#include "monitor/monitor.h"
int monitor_cur_is_qmp(void)
{
return 0;
}
#include "qemu-common.h"
#include "monitor/monitor.h"
void monitor_print_filename(Monitor *mon, const char *filename)
{
}
#include "qemu-common.h"
#include "monitor/monitor.h"
void monitor_printf(Monitor *mon, const char *fmt, ...)
{
}
void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
{
}
#include "qemu-common.h"
#include "monitor/monitor.h"
void monitor_protocol_event(MonitorEvent event, QObject *data)
{
}
#include "qemu-common.h"
#include "monitor/monitor.h"
Monitor *cur_mon;
void monitor_set_error(Monitor *mon, QError *qerror)
{
}
#include "qemu-common.h"
#include "slirp/slirp.h"
void slirp_update_timeout(uint32_t *timeout)
{
}
void slirp_select_fill(int *pnfds, fd_set *readfds,
fd_set *writefds, fd_set *xfds)
{
}
void slirp_select_poll(fd_set *readfds, fd_set *writefds,
fd_set *xfds, int select_error)
{
}
#include "qemu-common.h"
#include "sysemu/sysemu.h"
void vm_stop(RunState state)
{
abort();
}
......@@ -70,7 +70,7 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
tests/test-qmp-input-visitor.o tests/test-qmp-input-strict.o \
tests/test-qmp-commands.o tests/test-visitor-serialization.o
test-qapi-obj-y = $(qobject-obj-y) $(qapi-obj-y) qemu-tool.o
test-qapi-obj-y = $(qobject-obj-y) $(qapi-obj-y)
test-qapi-obj-y += tests/test-qapi-visit.o tests/test-qapi-types.o
test-qapi-obj-y += module.o
......@@ -81,7 +81,7 @@ tests/check-qstring$(EXESUF): tests/check-qstring.o qstring.o
tests/check-qdict$(EXESUF): tests/check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o
tests/check-qlist$(EXESUF): tests/check-qlist.o qlist.o qint.o
tests/check-qfloat$(EXESUF): tests/check-qfloat.o qfloat.o
tests/check-qjson$(EXESUF): tests/check-qjson.o $(qobject-obj-y) qemu-tool.o
tests/check-qjson$(EXESUF): tests/check-qjson.o $(qobject-obj-y) libqemustub.a
tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) iov.o libqemustub.a
tests/test-aio$(EXESUF): tests/test-aio.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) libqemustub.a
tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(coroutine-obj-y) $(tools-obj-y) $(block-obj-y) libqemustub.a
......@@ -98,13 +98,13 @@ $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o tests -p "test-" < $<, " GEN $@")
tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y)
tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y)
tests/test-qmp-output-visitor$(EXESUF): tests/test-qmp-output-visitor.o $(test-qapi-obj-y)
tests/test-qmp-input-visitor$(EXESUF): tests/test-qmp-input-visitor.o $(test-qapi-obj-y)
tests/test-qmp-input-strict$(EXESUF): tests/test-qmp-input-strict.o $(test-qapi-obj-y)
tests/test-qmp-commands$(EXESUF): tests/test-qmp-commands.o tests/test-qmp-marshal.o $(test-qapi-obj-y)
tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y)
tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y) libqemustub.a
tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y) libqemustub.a
tests/test-qmp-output-visitor$(EXESUF): tests/test-qmp-output-visitor.o $(test-qapi-obj-y) libqemustub.a
tests/test-qmp-input-visitor$(EXESUF): tests/test-qmp-input-visitor.o $(test-qapi-obj-y) libqemustub.a
tests/test-qmp-input-strict$(EXESUF): tests/test-qmp-input-strict.o $(test-qapi-obj-y) libqemustub.a
tests/test-qmp-commands$(EXESUF): tests/test-qmp-commands.o tests/test-qmp-marshal.o $(test-qapi-obj-y) libqemustub.a
tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y) libqemustub.a
tests/rtc-test$(EXESUF): tests/rtc-test.o $(trace-obj-y)
tests/m48t59-test$(EXESUF): tests/m48t59-test.o $(trace-obj-y)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment