From 4bd802b209cff612d1a99674a91895b735be8630 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 07:12:16 +0100 Subject: Clean up includes Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes, with the changes to the following files manually reverted: contrib/libvhost-user/libvhost-user-glib.h contrib/libvhost-user/libvhost-user.c contrib/libvhost-user/libvhost-user.h contrib/plugins/hotblocks.c contrib/plugins/hotpages.c contrib/plugins/howvec.c contrib/plugins/lockstep.c linux-user/mips64/cpu_loop.c linux-user/mips64/signal.c linux-user/sparc64/cpu_loop.c linux-user/sparc64/signal.c linux-user/x86_64/cpu_loop.c linux-user/x86_64/signal.c target/s390x/gen-features.c tests/fp/platform.h tests/migration/s390x/a-b-bios.c tests/plugin/bb.c tests/plugin/empty.c tests/plugin/insn.c tests/plugin/mem.c tests/test-rcu-simpleq.c tests/test-rcu-slist.c tests/test-rcu-tailq.c tests/uefi-test-tools/UefiTestToolsPkg/BiosTablesTest/BiosTablesTest.c contrib/plugins/, tests/plugin/, and tests/test-rcu-slist.c appear not to include osdep.h intentionally. The remaining reverts are the same as in commit bbfff19688d. Signed-off-by: Markus Armbruster Message-Id: <20201113061216.2483385-1-armbru@redhat.com> Acked-by: Paolo Bonzini Acked-by: Dr. David Alan Gilbert Tested-by: Thomas Huth Acked-by: Cornelia Huck Acked-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi Acked-by: Alexander Bulekov --- include/hw/block/swim.h | 1 - include/hw/display/macfb.h | 1 - include/qemu/nvdimm-utils.h | 1 - 3 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/hw/block/swim.h b/include/hw/block/swim.h index 5a49029..c1bd5f6 100644 --- a/include/hw/block/swim.h +++ b/include/hw/block/swim.h @@ -11,7 +11,6 @@ #ifndef SWIM_H #define SWIM_H -#include "qemu/osdep.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h index c133fa2..80806b0 100644 --- a/include/hw/display/macfb.h +++ b/include/hw/display/macfb.h @@ -13,7 +13,6 @@ #ifndef MACFB_H #define MACFB_H -#include "qemu/osdep.h" #include "exec/memory.h" #include "ui/console.h" #include "qom/object.h" diff --git a/include/qemu/nvdimm-utils.h b/include/qemu/nvdimm-utils.h index 4b8b198..5f45774 100644 --- a/include/qemu/nvdimm-utils.h +++ b/include/qemu/nvdimm-utils.h @@ -1,7 +1,6 @@ #ifndef NVDIMM_UTILS_H #define NVDIMM_UTILS_H -#include "qemu/osdep.h" GSList *nvdimm_get_device_list(void); #endif -- cgit v1.1 From ac114d5cd593b428074b5978e9a80efd812210e5 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 09:26:17 +0100 Subject: qerror: Drop unused QERR_ macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QERR_INVALID_BLOCK_FORMAT is dead since commit e6641719fe "block: Always pass NULL as drv for bdrv_open()", 2015-09-14. QERR_INVALID_PASSWORD is dead since commit c01c214b69 "block: remove all encryption handling APIs", 2017-07-11. Bury them. Signed-off-by: Markus Armbruster Message-Id: <20201113082626.2725812-2-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé --- include/qapi/qmp/qerror.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'include') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 7c76e24..3eabd45 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -43,9 +43,6 @@ #define QERR_FEATURE_DISABLED \ "The feature '%s' is not enabled" -#define QERR_INVALID_BLOCK_FORMAT \ - "Invalid block format '%s'" - #define QERR_INVALID_PARAMETER \ "Invalid parameter '%s'" @@ -55,9 +52,6 @@ #define QERR_INVALID_PARAMETER_VALUE \ "Parameter '%s' expects %s" -#define QERR_INVALID_PASSWORD \ - "Password incorrect" - #define QERR_IO_ERROR \ "An IO error has occurred" -- cgit v1.1 From f820af87433af84c13cd260807b59bbce47e2f0a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 09:26:18 +0100 Subject: qerror: Eliminate QERR_ macros used in just one place Signed-off-by: Markus Armbruster Message-Id: <20201113082626.2725812-3-armbru@redhat.com> --- include/qapi/qmp/qerror.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 3eabd45..c272e3f 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -25,21 +25,12 @@ #define QERR_DEVICE_HAS_NO_MEDIUM \ "Device '%s' has no medium" -#define QERR_DEVICE_INIT_FAILED \ - "Device '%s' could not be initialized" - #define QERR_DEVICE_IN_USE \ "Device '%s' is in use" #define QERR_DEVICE_NO_HOTPLUG \ "Device '%s' does not support hotplugging" -#define QERR_FD_NOT_FOUND \ - "File descriptor named '%s' not found" - -#define QERR_FD_NOT_SUPPLIED \ - "No file descriptor supplied via SCM_RIGHTS" - #define QERR_FEATURE_DISABLED \ "The feature '%s' is not enabled" -- cgit v1.1 From b0d7be2a62eecade217fa45521be18149346eaa1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 09:26:19 +0100 Subject: block: Improve some block-commit, block-stream error messages block-commit defaults @base-node to the deepest backing image. When there is none, it fails with "Base 'NULL' not found". Improve to "There is no backing image". block-commit and block-stream reject a @base argument that doesn't resolve with "Base 'BASE' not found". Commit 6b33f3ae8b "qemu-img: Improve commit invalid base message" improved this message in qemu-img. Improve it here, too: "Can't find '%s' in the backing chain". QERR_BASE_NOT_FOUND is now unused. Drop. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20201113082626.2725812-4-armbru@redhat.com> Reviewed-by: Max Reitz --- include/qapi/qmp/qerror.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index c272e3f..5d7e69c 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -16,8 +16,6 @@ * These macros will go away, please don't use in new code, and do not * add new ones! */ -#define QERR_BASE_NOT_FOUND \ - "Base '%s' not found" #define QERR_BUS_NO_HOTPLUG \ "Bus '%s' does not support hotplugging" -- cgit v1.1 From 9272186d3dbfc770993195f480422fdf058896c5 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 09:26:20 +0100 Subject: ui: Improve some set_passwd, expire_password error messages set_passwd and expire_password reject invalid "protocol" with "Invalid parameter 'protocol'". Misleading; the parameter is valid, its value isn't. Improve to "Parameter 'protocol' expects 'vnc' or 'spice'". expire_password fails with "Could not set password". Misleading; improve to "Could not set password expire time". QERR_SET_PASSWD_FAILED is now unused. Drop. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Message-Id: <20201113082626.2725812-5-armbru@redhat.com> --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 5d7e69c..d826712 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -65,9 +65,6 @@ #define QERR_REPLAY_NOT_SUPPORTED \ "Record/replay feature is not supported for '%s'" -#define QERR_SET_PASSWD_FAILED \ - "Could not set password" - #define QERR_UNDEFINED_ERROR \ "An undefined error has occurred" -- cgit v1.1 From 9e1b9c6c2d909d399ced0379e7095716c611b0f9 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Nov 2020 09:26:21 +0100 Subject: ui: Improve a client_migrate_info error message client_migrate_info reports spice_server_migrate_connect() failure as "An undefined error has occurred". Improve to "Could not set up display for migration". QERR_UNDEFINED_ERROR is now unused. Drop. Cc: Gerd Hoffmann Signed-off-by: Markus Armbruster Message-Id: <20201113082626.2725812-6-armbru@redhat.com> --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include') diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index d826712..596fce0 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -65,9 +65,6 @@ #define QERR_REPLAY_NOT_SUPPORTED \ "Record/replay feature is not supported for '%s'" -#define QERR_UNDEFINED_ERROR \ - "An undefined error has occurred" - #define QERR_UNSUPPORTED \ "this feature or command is not currently supported" -- cgit v1.1