diff options
author | Markus Armbruster <armbru@redhat.com> | 2016-03-09 12:19:37 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-03-22 22:20:16 +0100 |
commit | 0137fdc0941cfe214e91c5c1444f3fcf6a5548b8 (patch) | |
tree | 61f27c71cf084015b3c0f54de6321dba697e2b8c /include | |
parent | daf015ef5ab7b67f4676fcbe74c57b1709f6cb70 (diff) | |
download | qemu-0137fdc0941cfe214e91c5c1444f3fcf6a5548b8.tar.gz qemu-0137fdc0941cfe214e91c5c1444f3fcf6a5548b8.tar.bz2 qemu-0137fdc0941cfe214e91c5c1444f3fcf6a5548b8.zip |
include/hw/hw.h: Don't include qemu-common.h
qemu-common.h should only be included by .c files. Its file comment
explains why: "No header file should depend on qemu-common.h, as this
would easily lead to circular header dependencies."
hw/hw.h includes qemu-common.h, but its users generally need only
hw_error() and qemu/module.h from it. Move the former to hw/hw.h,
include the latter there, and drop the ill-advised include.
hw/misc/cbus.c now misses hw_error(), so include hw/hw.h there.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/hw.h | 4 | ||||
-rw-r--r-- | include/qemu-common.h | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/hw/hw.h b/include/hw/hw.h index cd3d410f97..2cb69d5f5b 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -2,7 +2,6 @@ #ifndef QEMU_HW_H #define QEMU_HW_H -#include "qemu-common.h" #if !defined(CONFIG_USER_ONLY) && !defined(NEED_CPU_H) #include "exec/cpu-common.h" @@ -13,6 +12,7 @@ #include "block/aio.h" #include "migration/vmstate.h" #include "qemu/log.h" +#include "qemu/module.h" #ifdef NEED_CPU_H #if TARGET_LONG_BITS == 64 @@ -41,6 +41,8 @@ typedef void QEMUResetHandler(void *opaque); void qemu_register_reset(QEMUResetHandler *func, void *opaque); void qemu_unregister_reset(QEMUResetHandler *func, void *opaque); +void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); + #ifdef NEED_CPU_H #if TARGET_LONG_BITS == 64 #define VMSTATE_UINTTL_V(_f, _s, _v) \ diff --git a/include/qemu-common.h b/include/qemu-common.h index b8fbd9ea62..ba37968503 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -303,10 +303,6 @@ int qemu_openpty_raw(int *aslave, char *pty_name); sendto(sockfd, buf, len, flags, destaddr, addrlen) #endif -/* Error handling. */ - -void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); - struct ParallelIOArg { void *buffer; int count; |