diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/vfio/vfio-common.h | 3 | ||||
-rw-r--r-- | include/qapi/error.h | 14 | ||||
-rw-r--r-- | include/qapi/qmp/qerror.h | 6 | ||||
-rw-r--r-- | include/sysemu/blockdev.h | 3 | ||||
-rw-r--r-- | include/sysemu/numa.h | 1 | ||||
-rw-r--r-- | include/sysemu/tpm.h | 2 | ||||
-rw-r--r-- | include/ui/console.h | 2 |
7 files changed, 22 insertions, 9 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index e46a289..1b434d0 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -31,8 +31,7 @@ #include <linux/vfio.h> #endif -#define ERR_PREFIX "vfio error: %s: " -#define WARN_PREFIX "vfio warning: %s: " +#define VFIO_MSG_PREFIX "vfio %s: " enum { VFIO_DEVICE_TYPE_PCI = 0, diff --git a/include/qapi/error.h b/include/qapi/error.h index bcb86a7..51b63dd 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -52,8 +52,12 @@ * where Error **errp is a parameter, by convention the last one. * * Pass an existing error to the caller with the message modified: + * error_propagate_prepend(errp, err); + * + * Avoid * error_propagate(errp, err); * error_prepend(errp, "Could not frobnicate '%s': ", name); + * because this fails to prepend when @errp is &error_fatal. * * Create a new error and pass it to the caller: * error_setg(errp, "situation normal, all fouled up"); @@ -215,6 +219,16 @@ void error_setg_win32_internal(Error **errp, */ void error_propagate(Error **dst_errp, Error *local_err); + +/* + * Propagate error object (if any) with some text prepended. + * Behaves like + * error_prepend(&local_err, fmt, ...); + * error_propagate(dst_errp, local_err); + */ +void error_propagate_prepend(Error **dst_errp, Error *local_err, + const char *fmt, ...); + /* * Prepend some text to @errp's human-readable error message. * The text is made by formatting @fmt, @ap like vprintf(). diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 145571f..7c76e24 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -79,6 +79,9 @@ #define QERR_QGA_COMMAND_FAILED \ "Guest agent command failed, error was '%s'" +#define QERR_REPLAY_NOT_SUPPORTED \ + "Record/replay feature is not supported for '%s'" + #define QERR_SET_PASSWD_FAILED \ "Could not set password" @@ -88,7 +91,4 @@ #define QERR_UNSUPPORTED \ "this feature or command is not currently supported" -#define QERR_REPLAY_NOT_SUPPORTED \ - "Record/replay feature is not supported for '%s'" - #endif /* QERROR_H */ diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h index 24954b9..d34c492 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -54,7 +54,8 @@ DriveInfo *drive_get_next(BlockInterfaceType type); QemuOpts *drive_def(const char *optstr); QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file, const char *optstr); -DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type); +DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type, + Error **errp); /* device-hotplug */ diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h index 7a0ae75..21713b7 100644 --- a/include/sysemu/numa.h +++ b/include/sysemu/numa.h @@ -22,7 +22,6 @@ struct NumaNodeMem { }; extern NodeInfo numa_info[MAX_NODES]; -int parse_numa(void *opaque, QemuOpts *opts, Error **errp); void parse_numa_opts(MachineState *ms); void numa_complete_configuration(MachineState *ms); void query_numa_node_mem(NumaNodeMem node_mem[]); diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 9ae1ab6..17a97ed 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -16,7 +16,7 @@ #include "qom/object.h" int tpm_config_parse(QemuOptsList *opts_list, const char *optarg); -int tpm_init(void); +void tpm_init(void); void tpm_cleanup(void); typedef enum TPMVersion { diff --git a/include/ui/console.h b/include/ui/console.h index fb969ca..c17803c 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -453,7 +453,7 @@ void qemu_display_early_init(DisplayOptions *opts); void qemu_display_init(DisplayState *ds, DisplayOptions *opts); /* vnc.c */ -void vnc_display_init(const char *id); +void vnc_display_init(const char *id, Error **errp); void vnc_display_open(const char *id, Error **errp); void vnc_display_add_client(const char *id, int csock, bool skipauth); int vnc_display_password(const char *id, const char *password); |