From b29b47e9b35017428904e0e934700877dfaabe73 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Mon, 18 Jan 2016 10:42:01 -0800 Subject: qom: Correct object_property_get_int() description The description of object_property_get_int() stated that on an error it returns NULL. This is not the case and the function will return -1 if an error occurs. Update the commented documentation accordingly. Reported-By: Christian Liebhardt Signed-off-by: Christian Liebhardt Signed-off-by: Alistair Francis Signed-off-by: Michael Tokarev --- include/qom/object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/qom/object.h b/include/qom/object.h index 698827d948..33abce930b 100644 --- a/include/qom/object.h +++ b/include/qom/object.h @@ -1115,7 +1115,7 @@ void object_property_set_int(Object *obj, int64_t value, * @name: the name of the property * @errp: returns an error if this function fails * - * Returns: the value of the property, converted to an integer, or NULL if + * Returns: the value of the property, converted to an integer, or negative if * an error occurs (including when the property value is not an integer). */ int64_t object_property_get_int(Object *obj, const char *name, -- cgit v1.2.3-55-g7522 From 945123a554c39b68f38cec87403de1f783a86906 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 19 Jan 2016 13:08:28 +0100 Subject: cpu: cpu_save/cpu_load is no more Everything has been converted to vmstate. Signed-off-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- exec.c | 6 ------ include/qemu-common.h | 6 ------ 2 files changed, 12 deletions(-) (limited to 'include') diff --git a/exec.c b/exec.c index 7d67c11601..ca7f8df909 100644 --- a/exec.c +++ b/exec.c @@ -661,12 +661,6 @@ void cpu_exec_init(CPUState *cpu, Error **errp) if (qdev_get_vmsd(DEVICE(cpu)) == NULL) { vmstate_register(NULL, cpu_index, &vmstate_cpu_common, cpu); } -#if defined(CPU_SAVE_VERSION) && !defined(CONFIG_USER_ONLY) - register_savevm(NULL, "cpu", cpu_index, CPU_SAVE_VERSION, - cpu_save, cpu_load, cpu->env_ptr); - assert(cc->vmsd == NULL); - assert(qdev_get_vmsd(DEVICE(cpu)) == NULL); -#endif if (cc->vmsd != NULL) { vmstate_register(NULL, cpu_index, cc->vmsd, cpu); } diff --git a/include/qemu-common.h b/include/qemu-common.h index 22b010c7d7..f557be78e3 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -330,12 +330,6 @@ bool tcg_enabled(void); void cpu_exec_init_all(void); -/* CPU save/load. */ -#ifdef CPU_SAVE_VERSION -void cpu_save(QEMUFile *f, void *opaque); -int cpu_load(QEMUFile *f, void *opaque, int version_id); -#endif - /* Unblock cpu */ void qemu_cpu_kick_self(void); -- cgit v1.2.3-55-g7522 From 1834ed3afc578b8dbf39838cfdf27d457771a334 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 9 Feb 2016 15:16:57 +0100 Subject: w32: include winsock2.h before windows.h Recent Fedora complains while compiling ui/sdl.c: /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp] And with this patch we dutifully obey. Stefan Weil: Without that patch, windows.h will include winsock.h (which conflicts with winsock2.h) when compiling sdl.c. Normally we define WIN32_LEAN_AND_MEAN, and windows.h won't include winsock.h. include/ui/sdl2.h and ui/sdl.c undefine that macro, so the order of the include files is important. Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- include/sysemu/os-win32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index 400e098607..fbed346716 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -26,8 +26,8 @@ #ifndef QEMU_OS_WIN32_H #define QEMU_OS_WIN32_H -#include #include +#include /* Workaround for older versions of MinGW. */ #ifndef ECONNREFUSED -- cgit v1.2.3-55-g7522