Miscellaneous patches for 2020-12-10
Subsystems (3)
[PULL 04/13] block: Improve some block-commit, block-stream error messages
In reply to Markus Armbrusterblock-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.
Message-Id: <[email protected]>
--- include/qapi/qmp/qerror.h | 2 -- blockdev.c | 15 +++++++++------ tests/qemu-iotests/040 | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-)
include/qapi/qmp/qerror.h +0 -2
@@ -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"
blockdev.c +9 -6
@@ -2531,7 +2531,7 @@ void qmp_block_stream(bool has_job_id, const char *job_id, const char *device,if (has_base) { base_bs =bdrv_find_backing_image (bs, base);if (base_bs ==NULL ) { -error_setg (errp,QERR_BASE_NOT_FOUND , base); +error_setg (errp,"Can't find '%s' in the backing chain" , base); goto out; }assert (bdrv_get_aio_context (base_bs) == aio_context);
@@ -2703,13 +2703,16 @@ void qmp_block_commit(bool has_job_id, const char *job_id, const char *device, } }else if (has_base && base) { base_bs =bdrv_find_backing_image (top_bs, base); +if (base_bs ==NULL ) { +error_setg (errp,"Can't find '%s' in the backing chain" , base); + goto out; + } }else { base_bs =bdrv_find_base (top_bs); - } - -if (base_bs ==NULL ) { -error_setg (errp,QERR_BASE_NOT_FOUND , base ? base :"NULL" ); - goto out; +if (base_bs ==NULL ) { +error_setg (errp,"There is no backimg image" ); + goto out; + } }assert (bdrv_get_aio_context (base_bs) == aio_context);
tests/qemu-iotests/040 +6 -6
@@ -156,7 +156,7 @@ class TestSingleDrive(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % backing_img) self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % backing_img) + self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % backing_img) def test_top_invalid(self): self.assert_no_active_block_jobs()
@@ -168,7 +168,7 @@ class TestSingleDrive(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % mid_img, base='badfile') self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'badfile\' not found') + self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain") def test_top_node_invalid(self): self.assert_no_active_block_jobs()
@@ -208,7 +208,7 @@ class TestSingleDrive(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % backing_img, base='%s' % mid_img) self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % mid_img) + self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % mid_img) def test_top_and_base_node_reversed(self): self.assert_no_active_block_jobs()
@@ -349,7 +349,7 @@ class TestRelativePaths(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='%s' % self.mid_img) self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % self.mid_img) + self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img) def test_top_invalid(self): self.assert_no_active_block_jobs()
@@ -361,7 +361,7 @@ class TestRelativePaths(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.mid_img, base='badfile') self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'badfile\' not found') + self.assert_qmp(result, 'error/desc', "Can't find 'badfile' in the backing chain") def test_top_is_active(self): self.run_commit_test(self.test_img, self.backing_img)
@@ -372,7 +372,7 @@ class TestRelativePaths(ImageCommitTestCase): self.assert_no_active_block_jobs() result = self.vm.qmp('block-commit', device='drive0', top='%s' % self.backing_img, base='%s' % self.mid_img) self.assert_qmp(result, 'error/class', 'GenericError') - self.assert_qmp(result, 'error/desc', 'Base \'%s\' not found' % self.mid_img) + self.assert_qmp(result, 'error/desc', "Can't find '%s' in the backing chain" % self.mid_img) class TestSetSpeed(ImageCommitTestCase):
Signature · 1 line
2.26.2
[PULL 01/13] Clean up includes
In reply to Markus ArmbrusterClean 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.ccontrib/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.
Message-Id: <[email protected]>
--- contrib/vhost-user-gpu/vugbm.h | 2 -- contrib/vhost-user-gpu/vugpu.h | 1 - include/hw/block/swim.h | 1 - include/hw/display/macfb.h | 1 - include/qemu/nvdimm-utils.h | 1 - tests/qtest/fuzz/fuzz.h | 1 - tests/qtest/fuzz/generic_fuzz_configs.h | 1 - tools/virtiofsd/fuse_common.h | 2 -- tools/virtiofsd/fuse_log.h | 1 - tools/virtiofsd/fuse_lowlevel.h | 3 --- tools/virtiofsd/fuse_misc.h | 1 - tools/virtiofsd/passthrough_seccomp.h | 1 - contrib/vhost-user-gpu/virgl.c | 1 + contrib/vhost-user-gpu/vugbm.c | 1 + contrib/vhost-user-input/main.c | 1 - hw/display/artist.c | 1 - hw/s390x/s390-pci-vfio.c | 3 ++- tools/virtiofsd/buffer.c | 5 ----- tools/virtiofsd/fuse_log.c | 2 -- tools/virtiofsd/fuse_lowlevel.c | 10 ---------- tools/virtiofsd/fuse_opt.c | 4 ---- tools/virtiofsd/fuse_signals.c | 5 ----- tools/virtiofsd/fuse_virtio.c | 10 ---------- tools/virtiofsd/helper.c | 8 -------- tools/virtiofsd/passthrough_ll.c | 12 ------------ tools/virtiofsd/passthrough_seccomp.c | 3 --- util/nvdimm-utils.c | 1 + 27 files changed, 5 insertions(+), 78 deletions(-)
contrib/vhost-user-gpu/vugbm.h +0 -2
@@ -10,10 +10,8 @@#ifndef VHOST_USER_GPU_VUGBM_H #define VHOST_USER_GPU_VUGBM_H -#include "qemu/osdep.h" #ifdef CONFIG_MEMFD -#include <sys/mman.h> #include <sys/ioctl.h> #endif
contrib/vhost-user-gpu/vugpu.h +0 -1
@@ -15,7 +15,6 @@#ifndef VUGPU_H #define VUGPU_H -#include "qemu/osdep.h" #include "libvhost-user-glib.h" #include "standard-headers/linux/virtio_gpu.h"
include/hw/block/swim.h +0 -1
@@ -11,7 +11,6 @@#ifndef SWIM_H #define SWIM_H -#include "qemu/osdep.h" #include "hw/sysbus.h" #include "qom/object.h"
include/hw/display/macfb.h +0 -1
@@ -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"
include/qemu/nvdimm-utils.h +0 -1
@@ -1,7 +1,6 @@#ifndef NVDIMM_UTILS_H #define NVDIMM_UTILS_H -#include "qemu/osdep.h" GSList *nvdimm_get_device_list (void );#endif
tests/qtest/fuzz/fuzz.h +0 -1
@@ -14,7 +14,6 @@#ifndef FUZZER_H_ #define FUZZER_H_ -#include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h"
tests/qtest/fuzz/generic_fuzz_configs.h +0 -1
@@ -13,7 +13,6 @@ #ifndef GENERIC_FUZZ_CONFIGS_H #define GENERIC_FUZZ_CONFIGS_H -#include "qemu/osdep.h" typedef struct generic_fuzz_config { const char *name, *args, *objects;
tools/virtiofsd/fuse_common.h +0 -2
@@ -18,8 +18,6 @@#include "fuse_log.h" #include "fuse_opt.h" -#include <stdint.h> -#include <sys/types.h> /** Major version of FUSE library interface */ #define FUSE_MAJOR_VERSION 3
tools/virtiofsd/fuse_log.h +0 -1
@@ -14,7 +14,6 @@* This file defines the logging interface of FUSE */ -#include <stdarg.h> /** * Log severity level
tools/virtiofsd/fuse_lowlevel.h +0 -3
@@ -25,10 +25,7 @@#include "fuse_common.h" -#include <fcntl.h> -#include <sys/stat.h> #include <sys/statvfs.h> -#include <sys/types.h> #include <sys/uio.h> #include <utime.h>
tools/virtiofsd/fuse_misc.h +0 -1
@@ -7,7 +7,6 @@*/ #include <pthread.h> -#include "config-host.h" /* * Versioned symbols cannot be used in some cases because it
tools/virtiofsd/passthrough_seccomp.h +0 -1
@@ -9,7 +9,6 @@#ifndef VIRTIOFSD_SECCOMP_H #define VIRTIOFSD_SECCOMP_H -#include <stdbool.h> void setup_seccomp (bool enable_syslog);
contrib/vhost-user-gpu/virgl.c +1 -0
@@ -12,6 +12,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include <virglrenderer.h> #include "virgl.h"
contrib/vhost-user-gpu/vugbm.c +1 -0
@@ -7,6 +7,7 @@* See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "vugbm.h" static bool
contrib/vhost-user-input/main.c +0 -1
@@ -6,7 +6,6 @@#include "qemu/osdep.h" -#include <glib.h> #include <linux/input.h> #include "qemu/iov.h"
hw/display/artist.c +0 -1
@@ -9,7 +9,6 @@#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/error-report.h" -#include "qemu/typedefs.h" #include "qemu/log.h" #include "qemu/module.h" #include "qemu/units.h"
hw/s390x/s390-pci-vfio.c +2 -1
@@ -9,11 +9,12 @@* directory. */ +#include "qemu/osdep.h" +#include <sys/ioctl.h> #include <linux/vfio.h> #include <linux/vfio_zdev.h> -#include "qemu/osdep.h" #include "trace.h" #include "hw/s390x/s390-pci-bus.h" #include "hw/s390x/s390-pci-clp.h"
tools/virtiofsd/buffer.c +0 -5
@@ -12,11 +12,6 @@#include "qemu/osdep.h" #include "fuse_i.h" #include "fuse_lowlevel.h" -#include <assert.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> size_t fuse_buf_size (const struct fuse_bufvec *bufv) {
tools/virtiofsd/fuse_log.c +0 -2
@@ -11,8 +11,6 @@#include "qemu/osdep.h" #include "fuse_log.h" -#include <stdarg.h> -#include <stdio.h> static void default_log_func (__attribute__((unused))enum fuse_log_level level,const char *fmt,va_list ap)
tools/virtiofsd/fuse_lowlevel.c +0 -10
@@ -16,17 +16,7 @@#include "fuse_opt.h" #include "fuse_virtio.h" -#include <assert.h> -#include <errno.h> -#include <glib.h> -#include <limits.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/file.h> -#include <unistd.h> #define THREAD_POOL_SIZE 64
tools/virtiofsd/fuse_opt.c +0 -4
@@ -14,10 +14,6 @@#include "fuse_i.h" #include "fuse_misc.h" -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> struct fuse_opt_context {void *data;
tools/virtiofsd/fuse_signals.c +0 -5
@@ -12,11 +12,6 @@#include "fuse_i.h" #include "fuse_lowlevel.h" -#include <errno.h> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> static struct fuse_session *fuse_instance;
tools/virtiofsd/fuse_virtio.c +0 -10
@@ -20,20 +20,10 @@#include "fuse_opt.h" #include "fuse_virtio.h" -#include <assert.h> -#include <errno.h> -#include <glib.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/eventfd.h> #include <sys/socket.h> -#include <sys/types.h> #include <sys/un.h> -#include <sys/types.h> #include <grp.h> -#include <unistd.h> #include "libvhost-user.h"
tools/virtiofsd/helper.c +0 -8
@@ -16,16 +16,8 @@#include "fuse_misc.h" #include "fuse_opt.h" -#include <errno.h> -#include <limits.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/param.h> -#include <sys/time.h> #include <sys/resource.h> -#include <unistd.h> #define FUSE_HELPER_OPT (t, p) \ { \
tools/virtiofsd/passthrough_ll.c +0 -12
@@ -41,29 +41,17 @@#include "fuse_log.h" #include "fuse_lowlevel.h" #include "standard-headers/linux/fuse.h" -#include <assert.h> #include <cap-ng.h> #include <dirent.h> -#include <errno.h> -#include <glib.h> -#include <inttypes.h> -#include <limits.h> #include <pthread.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/file.h> #include <sys/mount.h> #include <sys/prctl.h> #include <sys/resource.h> #include <sys/syscall.h> -#include <sys/types.h> #include <sys/wait.h> #include <sys/xattr.h> #include <syslog.h> -#include <unistd.h> #include "qemu/cutils.h" #include "passthrough_helpers.h"
tools/virtiofsd/passthrough_seccomp.c +0 -3
@@ -10,10 +10,7 @@#include "passthrough_seccomp.h" #include "fuse_i.h" #include "fuse_log.h" -#include <errno.h> -#include <glib.h> #include <seccomp.h> -#include <stdlib.h> /* Bodge for libseccomp 2.4.2 which broke ppoll */ #if !defined(__SNR_ppoll) && defined(__SNR_brk)
util/nvdimm-utils.c +1 -0
@@ -1,3 +1,4 @@ +#include "qemu/osdep.h" #include "qemu/nvdimm-utils.h" #include "hw/mem/nvdimm.h"
Signature · 1 line
2.26.2
[PULL 02/13] qerror: Drop unused QERR_ macros
In reply to Markus ArmbrusterQERR_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.
Message-Id: <[email protected]>
--- include/qapi/qmp/qerror.h | 6 ------ 1 file changed, 6 deletions(-)
include/qapi/qmp/qerror.h +0 -6
@@ -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"
Signature · 1 line
2.26.2
[PULL 08/13] qga: Replace an unreachable error by abort()
In reply to Markus Armbrustercheck_suspend_mode()'s error message
Parameter 'mode' expects GuestSuspendMode
makes no sense to users: GuestSuspendMode is a C enum. Fortunately, it is unreachable. Replace it by abort().
Message-Id: <[email protected]>
--- qga/commands-win32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
qga/commands-win32.c +1 -2
@@ -1441,8 +1441,7 @@ static void check_suspend_mode(GuestSuspendMode mode, Error **errp) }break ;default : -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"mode" , -"GuestSuspendMode" ); +abort (); } }
Signature · 1 line
2.26.2
[PULL 06/13] ui: Improve a client_migrate_info error message
In reply to Markus Armbrusterclient_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.
Message-Id: <[email protected]>
--- include/qapi/qmp/qerror.h | 3 --- monitor/misc.c | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
include/qapi/qmp/qerror.h +0 -3
@@ -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"
monitor/misc.c +1 -1
@@ -441,7 +441,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname, has_port ? port : -1, has_tls_port ? tls_port : -1, cert_subject)) { -error_setg (errp,QERR_UNDEFINED_ERROR ); +error_setg (errp,"Could not set up display for migration" );return ; }return ;
Signature · 1 line
2.26.2
[PULL 12/13] qapi: Normalize version references x.y.0 to just x.y
In reply to Markus ArmbrusterWe use x.y most of the time, and x.y.0 sometimes. Normalize for consistency.
Message-Id: <[email protected]>
--- qapi/block-core.json | 28 ++++++++++++------------ qapi/block-export.json | 6 +++--- qapi/block.json | 2 +- qapi/char.json | 4 ++-- qapi/control.json | 14 ++++++------ qapi/machine-target.json | 22 +++++++++---------- qapi/machine.json | 46 ++++++++++++++++++++-------------------- qapi/migration.json | 16 +++++++------- qapi/misc-target.json | 2 +- qapi/misc.json | 30 +++++++++++++------------- qapi/net.json | 6 +++--- qapi/pci.json | 12 +++++------ qapi/qdev.json | 2 +- qapi/run-state.json | 16 +++++++------- qapi/ui.json | 40 +++++++++++++++++----------------- 15 files changed, 123 insertions(+), 123 deletions(-)
qapi/block-core.json +14 -14
@@ -302,7 +302,7 @@ # @ro: true if the backing device was open read-only # # @drv: the name of the block format used to open the backing device. As of -# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', +# 0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', # 'http', 'https', 'luks', 'nbd', 'parallels', 'qcow', # 'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat'
@@ -389,7 +389,7 @@ # @deprecated: Member @encryption_key_missing is deprecated. It is # always false. # -# Since: 0.14.0 +# Since: 0.14 # ## { 'struct': 'BlockDeviceInfo',
@@ -607,7 +607,7 @@ # @deprecated: Member @dirty-bitmaps is deprecated. Use @inserted # member @dirty-bitmaps instead. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'BlockInfo', 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
@@ -655,7 +655,7 @@ # Returns: a list of @BlockInfo describing each virtual block device. Filter # nodes that were created implicitly are skipped over. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -812,17 +812,17 @@ # @wr_operations: The number of write operations performed by the device. # # @flush_operations: The number of cache flush operations performed by the -# device (since 0.15.0) +# device (since 0.15) # # @unmap_operations: The number of unmap operations performed by the device # (Since 4.2) # -# @rd_total_time_ns: Total time spent on reads in nanoseconds (since 0.15.0). +# @rd_total_time_ns: Total time spent on reads in nanoseconds (since 0.15). # -# @wr_total_time_ns: Total time spent on writes in nanoseconds (since 0.15.0). +# @wr_total_time_ns: Total time spent on writes in nanoseconds (since 0.15). # # @flush_total_time_ns: Total time spent on cache flushes in nanoseconds -# (since 0.15.0). +# (since 0.15). # # @unmap_total_time_ns: Total time spent on unmap operations in nanoseconds # (Since 4.2)
@@ -884,7 +884,7 @@ # # @flush_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0) # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'BlockDeviceStats', 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'unmap_bytes' : 'int',
@@ -987,7 +987,7 @@ # @backing: This describes the backing block device if it has one. # (Since 2.0) # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'BlockStats', 'data': {'*device': 'str', '*qdev': 'str', '*node-name': 'str',
@@ -1011,7 +1011,7 @@ # # Returns: A list of @BlockStats for each virtual block devices. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1299,7 +1299,7 @@ # Returns: - nothing on success # - If @device is not a valid block device, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1484,7 +1484,7 @@ # Returns: - nothing on success # - If @device is not a valid block device, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -4852,7 +4852,7 @@ # Note: If action is "stop", a STOP event will eventually follow the # BLOCK_IO_ERROR event # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
qapi/block-export.json +3 -3
@@ -54,7 +54,7 @@ # # Returns: error if the server is already running. # -# Since: 1.3.0 +# Since: 1.3 ## { 'command': 'nbd-server-start', 'data': { 'addr': 'SocketAddressLegacy',
@@ -155,7 +155,7 @@ # Returns: error if the server is not running, or export with the same name # already exists. # -# Since: 1.3.0 +# Since: 1.3 ## { 'command': 'nbd-server-add', 'data': 'NbdServerAddOptions', 'boxed': true, 'features': ['deprecated'] }
@@ -211,7 +211,7 @@ # Stop QEMU's embedded NBD server, and unregister all devices previously # added via @nbd-server-add. # -# Since: 1.3.0 +# Since: 1.3 ## { 'command': 'nbd-server-stop' }
qapi/block.json +1 -1
@@ -107,7 +107,7 @@ # - If @device is not a valid block device, DeviceNotFound # Notes: Ejecting a device with no media results in success # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/char.json +2 -2
@@ -24,7 +24,7 @@ # Notes: @filename is encoded using the QEMU command line character device # encoding. See the QEMU man page for details. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'ChardevInfo', 'data': { 'label': 'str',
@@ -38,7 +38,7 @@ # # Returns: a list of @ChardevInfo # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/control.json +7 -7
@@ -87,7 +87,7 @@ # exact format depends on the downstream however it highly # recommended that a unique name is used. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'VersionInfo', 'data': {'qemu': 'VersionTriple', 'package': 'str'} }
@@ -99,7 +99,7 @@ # # Returns: A @VersionInfo object describing the current version of QEMU. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -126,7 +126,7 @@ # # @name: The command name # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'CommandInfo', 'data': {'name': 'str'} }
@@ -137,7 +137,7 @@ # # Returns: A list of @CommandInfo for all supported commands # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -166,7 +166,7 @@ # # @name: The event name # -# Since: 1.2.0 +# Since: 1.2 ## { 'struct': 'EventInfo', 'data': {'name': 'str'} }
@@ -182,7 +182,7 @@ # # Returns: A list of @EventInfo. # -# Since: 1.2.0 +# Since: 1.2 # # Example: #
@@ -212,7 +212,7 @@ # guaranteed. When using this interface, a premature EOF would not be # unexpected. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/machine-target.json +11 -11
@@ -17,7 +17,7 @@ # @name: the name of the CPU definition the model is based on # @props: a dictionary of QOM properties to be applied # -# Since: 2.8.0 +# Since: 2.8 ## { 'struct': 'CpuModelInfo', 'data': { 'name': 'str',
@@ -49,7 +49,7 @@ # version or machine-type, use @static (but keep in mind that some features may # be omitted). # -# Since: 2.8.0 +# Since: 2.8 ## { 'enum': 'CpuModelExpansionType', 'data': [ 'static', 'full' ] }
@@ -73,7 +73,7 @@ # @subset: If model A is a subset of model B, model A is guaranteed to run # where model B runs. There are no guarantees about the other way. # -# Since: 2.8.0 +# Since: 2.8 ## { 'enum': 'CpuModelCompareResult', 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
@@ -85,7 +85,7 @@ # # @model: the baselined CpuModelInfo. # -# Since: 2.8.0 +# Since: 2.8 ## { 'struct': 'CpuModelBaselineInfo', 'data': { 'model': 'CpuModelInfo' },
@@ -107,7 +107,7 @@ # CPU models identical. If the special property name "type" is included, the # models are by definition not identical and cannot be made identical. # -# Since: 2.8.0 +# Since: 2.8 ## { 'struct': 'CpuModelCompareInfo', 'data': { 'result': 'CpuModelCompareResult',
@@ -151,7 +151,7 @@ # Note: this command isn't specific to s390x, but is only implemented # on this architecture currently. # -# Since: 2.8.0 +# Since: 2.8 ## { 'command': 'query-cpu-model-comparison', 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
@@ -194,7 +194,7 @@ # Note: this command isn't specific to s390x, but is only implemented # on this architecture currently. # -# Since: 2.8.0 +# Since: 2.8 ## { 'command': 'query-cpu-model-baseline', 'data': { 'modela': 'CpuModelInfo',
@@ -209,7 +209,7 @@ # # @model: the expanded CpuModelInfo. # -# Since: 2.8.0 +# Since: 2.8 ## { 'struct': 'CpuModelExpansionInfo', 'data': { 'model': 'CpuModelInfo' },
@@ -246,7 +246,7 @@ # with a wrong type. Also returns an error if an expansion type is # not supported. # -# Since: 2.8.0 +# Since: 2.8 ## { 'command': 'query-cpu-model-expansion', 'data': { 'type': 'CpuModelExpansionType',
@@ -306,7 +306,7 @@ # If @unavailable-features is not present, runnability # information for the CPU is not available. # -# Since: 1.2.0 +# Since: 1.2 ## { 'struct': 'CpuDefinitionInfo', 'data': { 'name': 'str',
@@ -325,7 +325,7 @@ # # Returns: a list of CpuDefInfo # -# Since: 1.2.0 +# Since: 1.2 ## { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'], 'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X) || defined(TARGET_MIPS)' }
qapi/machine.json +23 -23
179 lines not on this page · raw message
qapi/migration.json +8 -8
@@ -46,7 +46,7 @@ # @pages-per-second: the number of memory pages transferred per second # (Since 4.0) # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'MigrationStats', 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
@@ -224,7 +224,7 @@ # only returned if VFIO device is present, migration is supported by all # VFIO devices and status is 'active' or 'completed' (since 5.2) # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'MigrationInfo', 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
@@ -252,7 +252,7 @@ # # Returns: @MigrationInfo # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1143,7 +1143,7 @@ # @tls-port: spice tcp port for tls-secured channels # @cert-subject: server certificate subject # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1343,7 +1343,7 @@ # # Notes: This command succeeds even if there is no migration process running. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1383,7 +1383,7 @@ # # Returns: nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1407,7 +1407,7 @@ # # Returns: nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -1486,7 +1486,7 @@ # # Returns: nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Notes: #
qapi/misc-target.json +1 -1
@@ -12,7 +12,7 @@ # # Note: This event is rate-limited. # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
qapi/misc.json +15 -15
@@ -27,7 +27,7 @@ # # Returns: nothing on success. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -47,7 +47,7 @@ # # @name: The name of the guest # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
@@ -58,7 +58,7 @@ # # Returns: @NameInfo of the guest # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -132,7 +132,7 @@ # # Stop all guest VCPU execution. # -# Since: 0.14.0 +# Since: 0.14 # # Notes: This function will succeed even if the guest is already in the stopped # state. In "inmigrate" state, it will ensure that the guest
@@ -152,7 +152,7 @@ # # Resume guest VCPU execution. # -# Since: 0.14.0 +# Since: 0.14 # # Returns: If successful, nothing #
@@ -210,7 +210,7 @@ # # Returns: the output of the command as a string # -# Since: 0.14.0 +# Since: 0.14 # # Notes: This command only exists as a stop-gap. Its use is highly # discouraged. The semantics of this command are not
@@ -264,7 +264,7 @@ # Returns: - Nothing on success. # - If @device is not a valid block device, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -296,7 +296,7 @@ # # Returns: Nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Notes: If @fdname already exists, the file descriptor assigned to # it will be closed and replaced by the received file
@@ -322,7 +322,7 @@ # # Returns: Nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -342,7 +342,7 @@ # @fd: The file descriptor that was received via SCM rights and # added to the fd set. # -# Since: 1.2.0 +# Since: 1.2 ## { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
@@ -363,7 +363,7 @@ # # If @fdset-id is not specified, a new fd set will be created. # -# Since: 1.2.0 +# Since: 1.2 # # Example: #
@@ -388,7 +388,7 @@ # Returns: - Nothing on success # - If @fdset-id or @fd is not found, FdNotFound # -# Since: 1.2.0 +# Since: 1.2 # # Notes: The list of fd sets is shared by all monitor connections. #
@@ -412,7 +412,7 @@ # # @opaque: A free-form string that can be used to describe the fd. # -# Since: 1.2.0 +# Since: 1.2 ## { 'struct': 'FdsetFdInfo', 'data': {'fd': 'int', '*opaque': 'str'} }
@@ -426,7 +426,7 @@ # # @fds: A list of file descriptors that belong to this fd set. # -# Since: 1.2.0 +# Since: 1.2 ## { 'struct': 'FdsetInfo', 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
@@ -438,7 +438,7 @@ # # Returns: A list of @FdsetInfo # -# Since: 1.2.0 +# Since: 1.2 # # Note: The list of fd sets is shared by all monitor connections. #
qapi/net.json +3 -3
@@ -20,7 +20,7 @@ # Returns: Nothing on success # If @name is not a valid network device, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Notes: Not all network adapters support setting link status. This command # will succeed even if the network adapter does not support link status
@@ -42,7 +42,7 @@ # # Additional arguments depend on the type. # -# Since: 0.14.0 +# Since: 0.14 # # Returns: Nothing on success # If @type is not a valid network backend, DeviceNotFound
@@ -67,7 +67,7 @@ # Returns: Nothing on success # If @id is not a valid network backend, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/pci.json +6 -6
@@ -18,7 +18,7 @@ # # @limit: the ending address (guest physical) # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
@@ -38,7 +38,7 @@ # # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'PciMemoryRegion', 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
@@ -82,7 +82,7 @@ # # @devices: a list of @PciDeviceInfo for each device on this bridge # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'PciBridgeInfo', 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
@@ -148,7 +148,7 @@ # Notes: the contents of @class_info.desc are not stable and should only be # treated as informational. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'PciDeviceInfo', 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
@@ -165,7 +165,7 @@ # # @devices: a list of devices on this bus # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
@@ -179,7 +179,7 @@ # all PCI devices attached to it. Each device is represented by a # json-object. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/qdev.json +1 -1
@@ -86,7 +86,7 @@ # DEVICE_DELETED event. Guest reset will automatically complete removal # for all devices. # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
qapi/run-state.json +8 -8
@@ -107,7 +107,7 @@ # # @status: the virtual machine @RunState # -# Since: 0.14.0 +# Since: 0.14 # # Notes: @singlestep is enabled through the GDB stub ##
@@ -121,7 +121,7 @@ # # Returns: @StatusInfo reflecting all VCPUs # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -149,7 +149,7 @@ # Note: If the command-line option "-no-shutdown" has been specified, qemu will # not exit, and a STOP event will eventually follow the SHUTDOWN event # -# Since: 0.12.0 +# Since: 0.12 # # Example: #
@@ -165,7 +165,7 @@ # Emitted when the virtual machine is powered down through the power control # system, such as via ACPI. # -# Since: 0.12.0 +# Since: 0.12 # # Example: #
@@ -187,7 +187,7 @@ # # @reason: The @ShutdownCause of the RESET. (since 4.0) # -# Since: 0.12.0 +# Since: 0.12 # # Example: #
@@ -202,7 +202,7 @@ # # Emitted when the virtual machine is stopped # -# Since: 0.12.0 +# Since: 0.12 # # Example: #
@@ -217,7 +217,7 @@ # # Emitted when the virtual machine resumes execution # -# Since: 0.12.0 +# Since: 0.12 # # Example: #
@@ -288,7 +288,7 @@ # # Note: This event is rate-limited. # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
qapi/ui.json +20 -20
@@ -27,7 +27,7 @@ # Returns: - Nothing on success # - If Spice is not enabled, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -56,7 +56,7 @@ # Returns: - Nothing on success # - If @protocol is 'spice' and Spice is not active, DeviceNotFound # -# Since: 0.14.0 +# Since: 0.14 # # Notes: Time is relative to the server and currently there is no way to # coordinate server time with client time. It is not recommended to
@@ -88,7 +88,7 @@ # # Returns: Nothing on success # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -156,7 +156,7 @@ # # @tls: true if the channel is encrypted, false otherwise. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'SpiceChannel', 'base': 'SpiceBasicInfo',
@@ -215,7 +215,7 @@ # # @channels: a list of @SpiceChannel for each active spice channel # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'SpiceInfo', 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
@@ -230,7 +230,7 @@ # # Returns: @SpiceInfo # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -278,7 +278,7 @@ # # @client: client information # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -305,7 +305,7 @@ # # @client: client information # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -333,7 +333,7 @@ # # @client: client information # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -420,7 +420,7 @@ # @sasl_username: If SASL authentication is in use, the SASL username # used for authentication. # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'VncClientInfo', 'base': 'VncBasicInfo',
@@ -462,7 +462,7 @@ # # @clients: a list of @VncClientInfo of all currently connected clients # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'VncInfo', 'data': {'enabled': 'bool', '*host': 'str',
@@ -555,7 +555,7 @@ # # Returns: @VncInfo # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -619,7 +619,7 @@ # Note: This event is emitted before any authentication takes place, thus # the authentication ID is not provided # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
@@ -647,7 +647,7 @@ # # @client: client information # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
@@ -674,7 +674,7 @@ # # @client: client information # -# Since: 0.13.0 +# Since: 0.13 # # Example: #
@@ -709,7 +709,7 @@ # # @absolute: true if this device supports absolute coordinates as input # -# Since: 0.14.0 +# Since: 0.14 ## { 'struct': 'MouseInfo', 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
@@ -722,7 +722,7 @@ # # Returns: a list of @MouseInfo for each device # -# Since: 0.14.0 +# Since: 0.14 # # Example: #
@@ -792,7 +792,7 @@ # 'sysrq' will be transparently changed to 'print', so they # are effectively synonyms. # -# Since: 1.3.0 +# Since: 1.3 # ## { 'enum': 'QKeyCode',
@@ -824,7 +824,7 @@ # # Represents a keyboard key. # -# Since: 1.3.0 +# Since: 1.3 ## { 'union': 'KeyValue', 'data': {
@@ -847,7 +847,7 @@ # Returns: - Nothing on success # - If key is unknown or redundant, InvalidParameter # -# Since: 1.3.0 +# Since: 1.3 # # Example: #
Signature · 1 line
2.26.2
The following changes since commit 00ef48ff0de9c3e5834e7e3f6691bbc80d08c114:
Merge remote-tracking branch 'remotes/kraxel/tags/microvm-20201210-pull-request' into staging (2020-12-10 12:53:01 +0000)
are available in the Git repository at:
git://repo.or.cz/qemu/armbru.git tags/pull-misc-2020-12-10
for you to fetch changes up to 4eb79bdf87206a223a7ad7a698af519d2ec75c14:
docs/devel/writing-qmp-commands.txt: Fix docs (2020-12-10 17:16:44 +0100)
----------------------------------------------------------------
Miscellaneous patches for 2020-12-10
----------------------------------------------------------------
Markus Armbruster (12):
Clean up includes
qerror: Drop unused QERR_ macros
qerror: Eliminate QERR_ macros used in just one place
block: Improve some block-commit, block-stream error messages
ui: Improve some set_passwd, expire_password error messages
ui: Improve a client_migrate_info error message
ui: Tweak a client_migrate_info error message
qga: Replace an unreachable error by abort()
qga: Tweak a guest-shutdown error message
qom: Improve {qom,device}-list-properties error messages Tweak a few "Parameter 'NAME' expects THING" error message
qapi: Normalize version references x.y.0 to just x.y
Zihao Chang (1):
docs/devel/writing-qmp-commands.txt: Fix docs
docs/devel/writing-qmp-commands.txt | 2 +- qapi/block-core.json | 28 ++++++++++---------- qapi/block-export.json | 6 ++--- qapi/block.json | 2 +- qapi/char.json | 4 +-- qapi/control.json | 14 +++++----- qapi/machine-target.json | 22 ++++++++-------- qapi/machine.json | 46 ++++++++++++++++----------------- qapi/migration.json | 16 ++++++------ qapi/misc-target.json | 2 +- qapi/misc.json | 30 ++++++++++----------- qapi/net.json | 6 ++--- qapi/pci.json | 12 ++++----- qapi/qdev.json | 2 +- qapi/run-state.json | 16 ++++++------ qapi/ui.json | 40 ++++++++++++++-------------- contrib/vhost-user-gpu/vugbm.h | 2 -- contrib/vhost-user-gpu/vugpu.h | 1 - include/hw/block/swim.h | 1 - include/hw/display/macfb.h | 1 - include/qapi/qmp/qerror.h | 23 ----------------- include/qemu/nvdimm-utils.h | 1 - tests/qtest/fuzz/fuzz.h | 1 - tests/qtest/fuzz/generic_fuzz_configs.h | 1 - tools/virtiofsd/fuse_common.h | 2 -- tools/virtiofsd/fuse_log.h | 1 - tools/virtiofsd/fuse_lowlevel.h | 3 --- tools/virtiofsd/fuse_misc.h | 1 - tools/virtiofsd/passthrough_seccomp.h | 1 - block/quorum.c | 2 +- blockdev.c | 17 +++++++----- chardev/char.c | 2 +- contrib/vhost-user-gpu/virgl.c | 1 + contrib/vhost-user-gpu/vugbm.c | 1 + contrib/vhost-user-input/main.c | 1 - hw/core/qdev-properties-system.c | 2 +- hw/display/artist.c | 1 - hw/s390x/s390-pci-vfio.c | 3 ++- monitor/misc.c | 12 ++++----- monitor/qmp-cmds.c | 38 +++++++++++---------------- net/net.c | 2 +- qga/commands-win32.c | 5 ++-- qom/qom-qmp-cmds.c | 17 +++++------- softmmu/qdev-monitor.c | 4 +-- tools/virtiofsd/buffer.c | 5 ---- tools/virtiofsd/fuse_log.c | 2 -- tools/virtiofsd/fuse_lowlevel.c | 10 ------- tools/virtiofsd/fuse_opt.c | 4 --- tools/virtiofsd/fuse_signals.c | 5 ---- tools/virtiofsd/fuse_virtio.c | 10 ------- tools/virtiofsd/helper.c | 8 ------ tools/virtiofsd/passthrough_ll.c | 12 --------- tools/virtiofsd/passthrough_seccomp.c | 3 --- util/nvdimm-utils.c | 1 + tests/qemu-iotests/040 | 12 ++++----- 55 files changed, 180 insertions(+), 287 deletions(-)
Signature · 1 line
2.26.2
[PULL 07/13] ui: Tweak a client_migrate_info error message
Change
Parameter 'protocol' expects spice
to
Parameter 'protocol' expects 'spice'
for consistency with similar error messages elsewhere.
Message-Id: <[email protected]>
--- monitor/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/misc.c +1 -1
@@ -447,7 +447,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname,return ; } -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"protocol" ,"spice" ); +error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"protocol" ,"'spice'" ); }static void hmp_logfile (Monitor *mon,const QDict *qdict)
Signature · 1 line
2.26.2
[PULL 03/13] qerror: Eliminate QERR_ macros used in just one place
In reply to Markus ArmbrusterMessage-Id: <[email protected]>
--- include/qapi/qmp/qerror.h | 9 --------- monitor/misc.c | 8 ++++---- net/net.c | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-)
include/qapi/qmp/qerror.h +0 -9
@@ -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"
monitor/misc.c +4 -4
@@ -1232,7 +1232,7 @@ void qmp_getfd(const char *fdname, Error **errp) fd =qemu_chr_fe_get_msgfd (&cur_mon->chr);if (fd ==-1 ) { -error_setg (errp,QERR_FD_NOT_SUPPLIED ); +error_setg (errp,"No file descriptor supplied via SCM_RIGHTS" );return ; }
@@ -1286,7 +1286,7 @@ void qmp_closefd(const char *fdname, Error **errp) }qemu_mutex_unlock (&cur_mon->mon_lock); -error_setg (errp,QERR_FD_NOT_FOUND , fdname); +error_setg (errp,"File descriptor named '%s' not found" , fdname); }int monitor_get_fd (Monitor *mon,const char *fdname,Error **errp)
@@ -1357,7 +1357,7 @@ AddfdInfo *qmp_add_fd(bool has_fdset_id, int64_t fdset_id, bool has_opaque, fd =qemu_chr_fe_get_msgfd (&mon->chr);if (fd ==-1 ) { -error_setg (errp,QERR_FD_NOT_SUPPLIED ); +error_setg (errp,"No file descriptor supplied via SCM_RIGHTS" ); goto error; }
@@ -1410,7 +1410,7 @@ error: }else {snprintf (fd_str,sizeof (fd_str),"fdset-id:%" PRId64, fdset_id); } -error_setg (errp,QERR_FD_NOT_FOUND , fd_str); +error_setg (errp,"File descriptor named '%s' not found" , fd_str); }FdsetInfoList *qmp_query_fdsets (Error **errp)
net/net.c +1 -1
@@ -1013,7 +1013,7 @@ static int net_client_init1(const Netdev *netdev, bool is_netdev, Error **errp)if (net_client_init_fun[netdev->type](netdev, netdev->id, peer, errp) <0 ) {/* FIXME drop when all init functions store an Error */ if (errp && !*errp) { -error_setg (errp,QERR_DEVICE_INIT_FAILED , +error_setg (errp,"Device '%s' could not be initialized" ,NetClientDriver_str (netdev->type)); }return -1 ;
Signature · 1 line
2.26.2
[PULL 10/13] qom: Improve {qom, device}-list-properties error messages
In reply to Markus Armbrusterdevice-list-properties reports
Parameter 'typename' expects device
when @typename exists, but isn't a TYPE_DEVICE. Improve this to
Parameter 'typename' expects a non-abstract device type
qom-list-properties reports
Parameter 'typename' expects object
when @typename exists, but isn't a TYPE_OBJECT. Improve this to
Parameter 'typename' expects a QOM type
Message-Id: <[email protected]>
--- qom/qom-qmp-cmds.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
qom/qom-qmp-cmds.c +6 -11
@@ -138,15 +138,10 @@ ObjectPropertyInfoList *qmp_device_list_properties(const char *typename,return NULL ; } - klass =object_class_dynamic_cast (klass,TYPE_DEVICE ); -if (klass ==NULL ) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"typename" ,TYPE_DEVICE ); -return NULL ; - } - -if (object_class_is_abstract (klass)) { +if (!object_class_dynamic_cast (klass,TYPE_DEVICE ) + ||object_class_is_abstract (klass)) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"typename" , -"non-abstract device type" ); +"a non-abstract device type" );return NULL ; }
@@ -208,9 +203,9 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char *typename,return NULL ; } - klass =object_class_dynamic_cast (klass,TYPE_OBJECT ); -if (klass ==NULL ) { -error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"typename" ,TYPE_OBJECT ); +if (!object_class_dynamic_cast (klass,TYPE_OBJECT )) { +error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"typename" , +"a QOM type" );return NULL ; }
Signature · 1 line
2.26.2
[PULL 13/13] docs/devel/writing-qmp-commands.txt: Fix docs
In reply to Markus ArmbrusterFrom: Zihao Chang <[email protected]>
Fix the example of add qmp hello-world example.
Without ":", make will report error:../qapi/misc.json:573:2: line should end with ':'
Message-Id: <[email protected]>
--- docs/devel/writing-qmp-commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
docs/devel/writing-qmp-commands.txt +1 -1
@@ -243,7 +243,7 @@ There are many examples of such documentation in the schema file already, but here goes "hello-world"'s new entry for qapi/misc.json: ## -# @hello-world +# @hello-world: # # Print a client provided string to the standard output stream. #
Signature · 1 line
2.26.2
[PULL 05/13] ui: Improve some set_passwd, expire_password error messages
In reply to Markus Armbrusterset_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.
Message-Id: <[email protected]>
--- include/qapi/qmp/qerror.h | 3 --- monitor/qmp-cmds.c | 38 +++++++++++++++----------------------- 2 files changed, 15 insertions(+), 26 deletions(-)
include/qapi/qmp/qerror.h +0 -3
@@ -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"
monitor/qmp-cmds.c +15 -23
@@ -199,13 +199,7 @@ void qmp_set_password(const char *protocol, const char *password, } rc = qemu_spice.set_passwd (password, fail_if_connected, disconnect_if_connected); -if (rc !=0 ) { -error_setg (errp,QERR_SET_PASSWD_FAILED ); - } -return ; - } - -if (strcmp (protocol,"vnc" ) ==0 ) { + }else if (strcmp (protocol,"vnc" ) ==0 ) {if (fail_if_connected || disconnect_if_connected) {/* vnc supports "connected=keep" only */ error_setg (errp,QERR_INVALID_PARAMETER ,"connected" );
@@ -214,13 +208,15 @@ void qmp_set_password(const char *protocol, const char *password,/* Note that setting an empty password will not disable login through * this interface. */ rc =vnc_display_password (NULL , password); -if (rc <0 ) { -error_setg (errp,QERR_SET_PASSWD_FAILED ); - } + }else { +error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"protocol" , +"'vnc' or 'spice'" );return ; } -error_setg (errp,QERR_INVALID_PARAMETER ,"protocol" ); +if (rc !=0 ) { +error_setg (errp,"Could not set password" ); + } } void qmp_expire_password(const char *protocol, const char *whenstr,
@@ -244,28 +240,24 @@ void qmp_expire_password(const char *protocol, const char *whenstr,return ; } rc = qemu_spice.set_pw_expire (when); -if (rc !=0 ) { -error_setg (errp,QERR_SET_PASSWD_FAILED ); - } -return ; - } - -if (strcmp (protocol,"vnc" ) ==0 ) { + }else if (strcmp (protocol,"vnc" ) ==0 ) { rc =vnc_display_pw_expire (NULL , when); -if (rc !=0 ) { -error_setg (errp,QERR_SET_PASSWD_FAILED ); - } + }else { +error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"protocol" , +"'vnc' or 'spice'" );return ; } -error_setg (errp,QERR_INVALID_PARAMETER ,"protocol" ); +if (rc !=0 ) { +error_setg (errp,"Could not set password expire time" ); + } }#ifdef CONFIG_VNC void qmp_change_vnc_password (const char *password,Error **errp) {if (vnc_display_password (NULL , password) <0 ) { -error_setg (errp,QERR_SET_PASSWD_FAILED ); +error_setg (errp,"Could not set password" ); } }
Signature · 1 line
2.26.2
[PULL 09/13] qga: Tweak a guest-shutdown error message
In reply to Markus ArmbrusterChange
Parameter 'mode' expects halt|powerdown|reboot
to
Parameter 'mode' expects 'halt', 'powerdown', or 'reboot'
for consistency with similar error messages elsewhere.
Message-Id: <[email protected]>
--- qga/commands-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
qga/commands-win32.c +1 -1
@@ -334,7 +334,7 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp) shutdown_flag |=EWX_REBOOT ; }else {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"mode" , -"halt|powerdown|reboot" ); +"'halt', 'powerdown', or 'reboot'" );return ; }
Signature · 1 line
2.26.2
[PULL 11/13] Tweak a few "Parameter 'NAME' expects THING" error message
In reply to Markus ArmbrusterChange to "expects a THING" where that's an obvious improvement
Message-Id: <[email protected]>
--- block/quorum.c | 2 +- blockdev.c | 2 +- chardev/char.c | 2 +- hw/core/qdev-properties-system.c | 2 +- softmmu/qdev-monitor.c | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-)
block/quorum.c +1 -1
@@ -856,7 +856,7 @@ static int quorum_valid_threshold(int threshold, int num_children, Error **errp)if (threshold <1 ) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE , -"vote-threshold" ,"value >= 1" ); +"vote-threshold" ,"a value >= 1" );return -ERANGE ; }
blockdev.c +1 -1
@@ -2991,7 +2991,7 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs, }if (granularity & (granularity -1 )) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"granularity" , -"power of 2" ); +"a power of 2" );return ; }
chardev/char.c +1 -1
@@ -521,7 +521,7 @@ static const ChardevClass *char_get_class(const char *driver, Error **errp)if (object_class_is_abstract (oc)) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"driver" , -"abstract device type" ); +"an abstract device type" );return NULL ; }
hw/core/qdev-properties-system.c +1 -1
@@ -776,7 +776,7 @@ static void set_pci_devfn(Object *obj, Visitor *v, const char *name, }if (value <-1 || value >255 ) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE , - name ? name :"null" ,"pci_devfn" ); + name ? name :"null" ,"a value between -1 and 255" );return ; } *ptr = value;
softmmu/qdev-monitor.c +2 -2
@@ -237,7 +237,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)if (object_class_is_abstract (oc)) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"driver" , -"non-abstract device type" ); +"a non-abstract device type" );return NULL ; }
@@ -245,7 +245,7 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)if (!dc->user_creatable || (qdev_hotplug && !dc->hotpluggable)) {error_setg (errp,QERR_INVALID_PARAMETER_VALUE ,"driver" , -"pluggable device type" ); +"a pluggable device type" );return NULL ; }
Signature · 1 line
2.26.2
Peter Maydell
AppliedQuoted 7 lines · Markus Armbruster
The following changes since commit
00ef48ff0de9c3e5834e7e3f6691bbc80d08c114:Merge remote-tracking branch 'remotes/kraxel/tags/microvm-20201210-pull-request' into staging (2020-12-10 12:53:01 +0000)
are available in the Git repository at:
Quoted 9 lines
git://repo.or.cz/qemu/armbru.gittags/pull-misc-2020-12-10for you to fetch changes up to
4eb79bdf87206a223a7ad7a698af519d2ec75c14:
docs/devel/writing-qmp-commands.txt: Fix docs (2020-12-10 17:16:44 +0100)----------------------------------------------------------------
Miscellaneous patches for 2020-12-10
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/6.0
for any user-visible changes.
-- PMM
Re: [PULL 13/13] docs/devel/writing-qmp-commands.txt: Fix docs
In reply to Markus ArmbrusterQuoted 19 lines · Markus Armbruster
From: Zihao Chang <[email protected]>
Fix the example of add qmp hello-world example.
Without ":", make will report error:../qapi/misc.json:573:2: line should end with ':'Signed-off-by Zihao Chang <[email protected]>Message-Id: <[email protected]>
Reviewed-by Eric Blake <[email protected]>Signed-off-by Markus Armbruster <[email protected]>--- docs/devel/writing-qmp-commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)docs/devel/writing-qmp-commands.txt +0
-0
docs/devel/writing-qmp-commands.txt There are many examples of such documentation in the schema file already, but · line 243
Quoted 1 line
docs/devel/writing-qmp-commands.txt +0
-0@@ -243,7 +243,7 @@ There are many examples of such documentation in the schema file already, but here goes "hello-world"'s new entry for qapi/misc.json:
I follow the steps of hello world demo and find the problem, other entries seem to have the same problem. Because I didn't test the other entries, I only modified hello world. Maybe I can test them later.
Quoted 8 lines
docs/devel/writing-qmp-commands.txt +1
-1## -# @hello-world +# @hello-world: # # Print a client provided string to the standard output stream. #