提交 2f792016 编写于 作者: M Markus Armbruster

error: Move qemu_error & friends into their own header

上级 6e4f984c
#include "hw.h" #include "hw.h"
#include "sysemu.h" #include "qemu-error.h"
#include "scsi.h" #include "scsi.h"
#include "scsi-defs.h" #include "scsi-defs.h"
#include "block.h" #include "block.h"
......
...@@ -19,8 +19,6 @@ ...@@ -19,8 +19,6 @@
* the host adapter emulator. * the host adapter emulator.
*/ */
#include <qemu-common.h>
#include <sysemu.h>
//#define DEBUG_SCSI //#define DEBUG_SCSI
#ifdef DEBUG_SCSI #ifdef DEBUG_SCSI
...@@ -34,6 +32,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0) ...@@ -34,6 +32,7 @@ do { printf("scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0) do { fprintf(stderr, "scsi-disk: " fmt , ## __VA_ARGS__); } while (0)
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "block.h" #include "block.h"
#include "scsi.h" #include "scsi.h"
#include "scsi-defs.h" #include "scsi-defs.h"
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "block.h" #include "block.h"
#include "scsi.h" #include "scsi.h"
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*/ */
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "usb.h" #include "usb.h"
#include "qemu-char.h" #include "qemu-char.h"
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "net.h" #include "net.h"
#include "net/checksum.h" #include "net/checksum.h"
#include "net/tap.h" #include "net/tap.h"
#include "qemu-error.h"
#include "qemu-timer.h" #include "qemu-timer.h"
#include "virtio-net.h" #include "virtio-net.h"
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "virtio-blk.h" #include "virtio-blk.h"
#include "virtio-net.h" #include "virtio-net.h"
#include "pci.h" #include "pci.h"
#include "sysemu.h" #include "qemu-error.h"
#include "msix.h" #include "msix.h"
#include "net.h" #include "net.h"
#include "block_int.h" #include "block_int.h"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-char.h" #include "qemu-char.h"
#include "qemu-error.h"
#include "qerror.h" #include "qerror.h"
#include "qdict.h" #include "qdict.h"
#include "block.h" #include "block.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "dump.h" #include "dump.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "sysemu.h" #include "sysemu.h"
#include "qemu-error.h"
#include "qemu-log.h" #include "qemu-log.h"
typedef struct DumpState { typedef struct DumpState {
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
#include "net.h" #include "net.h"
#include "qemu-char.h" #include "qemu-char.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "qemu-option.h" #include "qemu-option.h"
#include "qemu_socket.h" #include "qemu_socket.h"
#include "sysemu.h"
typedef struct NetSocketState { typedef struct NetSocketState {
VLANClientState nc; VLANClientState nc;
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "sysemu.h" #include "sysemu.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required) int tap_open(char *ifname, int ifname_size, int *vnet_hdr, int vnet_hdr_required)
{ {
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "sysemu.h" #include "sysemu.h"
#include "qemu-char.h" #include "qemu-char.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "net/tap-linux.h" #include "net/tap-linux.h"
......
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
#include "qemu-option.h" #include "qemu-option.h"
#include "qemu-config.h" #include "qemu-config.h"
#include "sysemu.h" #include "sysemu.h"
......
#ifndef QEMU_ERROR_H
#define QEMU_ERROR_H
void qemu_error(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
void qemu_error_internal(const char *file, int linenr, const char *func,
const char *fmt, ...)
__attribute__ ((format(printf, 4, 5)));
#define qemu_error_new(fmt, ...) \
qemu_error_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
#endif
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
#include "qemu-common.h" #include "qemu-common.h"
#include "monitor.h" #include "monitor.h"
#include "sysemu.h"
#include "qemu-timer.h" #include "qemu-timer.h"
#include "qemu-log.h" #include "qemu-log.h"
#include "qemu-error.h"
#include <sys/time.h> #include <sys/time.h>
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
#include "qjson.h" #include "qjson.h"
#include "qerror.h" #include "qerror.h"
#include "qstring.h" #include "qstring.h"
#include "sysemu.h"
#include "qemu-common.h" #include "qemu-common.h"
#include "qemu-error.h"
static void qerror_destroy_obj(QObject *obj); static void qerror_destroy_obj(QObject *obj);
......
...@@ -73,14 +73,6 @@ int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f); ...@@ -73,14 +73,6 @@ int qemu_savevm_state_complete(Monitor *mon, QEMUFile *f);
void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f); void qemu_savevm_state_cancel(Monitor *mon, QEMUFile *f);
int qemu_loadvm_state(QEMUFile *f); int qemu_loadvm_state(QEMUFile *f);
void qemu_error(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
void qemu_error_internal(const char *file, int linenr, const char *func,
const char *fmt, ...)
__attribute__ ((format(printf, 4, 5)));
#define qemu_error_new(fmt, ...) \
qemu_error_internal(__FILE__, __LINE__, __func__, fmt, ## __VA_ARGS__)
#ifdef _WIN32 #ifdef _WIN32
/* Polling handling */ /* Polling handling */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册