From f6a1ef64408a5f7f52601589fef2a850b93d817e Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Fri, 26 Sep 2014 17:45:30 -0300 Subject: accel: Pass MachineState object to accel init functions Most of the machine options and machine state information is in the MachineState object, not on the MachineClass. This will allow init functions to use the MachineState object directly instead of qemu_get_machine_opts() or the current_machine global. Reviewed-by: Paolo Bonzini Signed-off-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- include/qemu/typedefs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qemu') diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 5f20b0e..04df51b 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -32,6 +32,7 @@ typedef struct MemoryMappingList MemoryMappingList; typedef struct QEMUMachine QEMUMachine; typedef struct MachineClass MachineClass; +typedef struct MachineState MachineState; typedef struct NICInfo NICInfo; typedef struct HCIInfo HCIInfo; typedef struct AudioState AudioState; -- cgit v1.1 From 5748e4c2be4f5c24c691f91328be02a9c4cb3063 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 8 Oct 2014 07:11:54 -0500 Subject: qemu-error: Add error_vreport() Needed to nicely print socket error reports. Signed-off-by: Corey Minyard Signed-off-by: Paolo Bonzini --- include/qemu/error-report.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/qemu') diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index 000eae3..7ab2355 100644 --- a/include/qemu/error-report.h +++ b/include/qemu/error-report.h @@ -38,6 +38,7 @@ void error_vprintf(const char *fmt, va_list ap) GCC_FMT_ATTR(1, 0); void error_printf(const char *fmt, ...) GCC_FMT_ATTR(1, 2); void error_printf_unless_qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2); void error_set_progname(const char *argv0); +void error_vreport(const char *fmt, va_list ap) GCC_FMT_ATTR(1, 0); void error_report(const char *fmt, ...) GCC_FMT_ATTR(1, 2); const char *error_get_progname(void); extern bool enable_timestamp_msg; -- cgit v1.1 From 5179502918d0c230afb50d8b95247de440fccdd5 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Wed, 8 Oct 2014 07:11:56 -0500 Subject: qemu-sockets: Add error to non-blocking connect handler An error value here would be quite handy and more consistent with the rest of the code. Signed-off-by: Corey Minyard [Make sure SO_ERROR value is passed to error_setg_errno. - Paolo] Signed-off-by: Paolo Bonzini --- include/qemu/sockets.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/qemu') diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index fdbb196..f47dae6 100644 --- a/include/qemu/sockets.h +++ b/include/qemu/sockets.h @@ -47,7 +47,7 @@ int recv_all(int fd, void *buf, int len1, bool single_read); /* callback function for nonblocking connect * valid fd on success, negative error code on failure */ -typedef void NonBlockingConnectHandler(int fd, void *opaque); +typedef void NonBlockingConnectHandler(int fd, Error *errp, void *opaque); InetSocketAddress *inet_parse(const char *str, Error **errp); int inet_listen_opts(QemuOpts *opts, int port_offset, Error **errp); -- cgit v1.1