From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFsC2-0003ZY-R4 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFsBy-0004P7-KN for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFsBy-0004Oj-7A for qemu-devel@nongnu.org; Wed, 22 Jun 2016 20:08:22 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3AF97F6B1 for ; Thu, 23 Jun 2016 00:08:21 +0000 (UTC) From: marcandre.lureau@redhat.com Date: Thu, 23 Jun 2016 02:08:03 +0200 Message-Id: <20160623000809.4522-7-marcandre.lureau@redhat.com> In-Reply-To: <20160623000809.4522-1-marcandre.lureau@redhat.com> References: <20160623000809.4522-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= From: Marc-Andr=C3=A9 Lureau This is no longer necessary, now that middle mode has been removed. Signed-off-by: Marc-Andr=C3=A9 Lureau --- docs/writing-qmp-commands.txt | 8 +- hmp-commands-info.hx | 118 ++++++++++++------------ hmp-commands.hx | 206 +++++++++++++++++++++---------------= ------ monitor.c | 11 +-- 4 files changed, 168 insertions(+), 175 deletions(-) diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.tx= t index 59aa77a..6208715 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs/writing-qmp-commands.txt @@ -127,7 +127,6 @@ following at the bottom: { .name =3D "hello-world", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_hello_world, }, =20 You're done. Now build qemu, run it as suggested in the "Testing" sectio= n, @@ -179,7 +178,6 @@ The last step is to update the qmp-commands.hx file: { .name =3D "hello-world", .args_type =3D "message:s?", - .mhandler.cmd_new =3D qmp_marshal_hello_world, }, =20 Notice that the "args_type" member got our "message" argument. The chara= cter @@ -337,7 +335,7 @@ we should add it to the hmp-commands.hx file: .args_type =3D "message:s?", .params =3D "hello-world [message]", .help =3D "Print message to the standard output", - .mhandler.cmd =3D hmp_hello_world, + .cmd =3D hmp_hello_world, }, =20 STEXI @@ -459,7 +457,6 @@ The last step is to add the correspoding entry in the= qmp-commands.hx file: { .name =3D "query-alarm-clock", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_alarm_clock, }, =20 Time to test the new command. Build qemu, run it as described in the "Te= sting" @@ -518,7 +515,7 @@ in the monitor.c file. The entry for the "info alarmc= lock" follows: .args_type =3D "", .params =3D "", .help =3D "show information about the alarm clock", - .mhandler.info =3D hmp_info_alarm_clock, + .cmd =3D hmp_info_alarm_clock, }, =20 To test this, run qemu and type "info alarmclock" in the user monitor. @@ -605,7 +602,6 @@ To test this you have to add the corresponding qmp-co= mmands.hx entry: { .name =3D "query-alarm-methods", .args_type =3D "", - .mhandler.cmd_new =3D qmp_marshal_query_alarm_methods, }, =20 Now Build qemu, run it as explained in the "Testing" section and try our= new diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx index 7da9e6c..9c095de 100644 --- a/hmp-commands-info.hx +++ b/hmp-commands-info.hx @@ -18,7 +18,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the version of QEMU", - .mhandler.cmd =3D hmp_info_version, + .cmd =3D hmp_info_version, }, =20 STEXI @@ -32,7 +32,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the network state", - .mhandler.cmd =3D hmp_info_network, + .cmd =3D hmp_info_network, }, =20 STEXI @@ -46,7 +46,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the character devices", - .mhandler.cmd =3D hmp_info_chardev, + .cmd =3D hmp_info_chardev, }, =20 STEXI @@ -61,7 +61,7 @@ ETEXI .params =3D "[-n] [-v] [device]", .help =3D "show info of one block device or all block devi= ces " "(-n: show named nodes; -v: show details)", - .mhandler.cmd =3D hmp_info_block, + .cmd =3D hmp_info_block, }, =20 STEXI @@ -75,7 +75,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show block device statistics", - .mhandler.cmd =3D hmp_info_blockstats, + .cmd =3D hmp_info_blockstats, }, =20 STEXI @@ -89,7 +89,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show progress of ongoing block device operation= s", - .mhandler.cmd =3D hmp_info_block_jobs, + .cmd =3D hmp_info_block_jobs, }, =20 STEXI @@ -103,7 +103,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the cpu registers", - .mhandler.cmd =3D hmp_info_registers, + .cmd =3D hmp_info_registers, }, =20 STEXI @@ -118,7 +118,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show local apic state", - .mhandler.cmd =3D hmp_info_local_apic, + .cmd =3D hmp_info_local_apic, }, #endif =20 @@ -134,7 +134,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show io apic state", - .mhandler.cmd =3D hmp_info_io_apic, + .cmd =3D hmp_info_io_apic, }, #endif =20 @@ -149,7 +149,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show infos for each CPU", - .mhandler.cmd =3D hmp_info_cpus, + .cmd =3D hmp_info_cpus, }, =20 STEXI @@ -163,7 +163,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the command line history", - .mhandler.cmd =3D hmp_info_history, + .cmd =3D hmp_info_history, }, =20 STEXI @@ -180,11 +180,11 @@ ETEXI .params =3D "", .help =3D "show the interrupts statistics (if available)", #ifdef TARGET_SPARC - .mhandler.cmd =3D sun4m_hmp_info_irq, + .cmd =3D sun4m_hmp_info_irq, #elif defined(TARGET_LM32) - .mhandler.cmd =3D lm32_hmp_info_irq, + .cmd =3D lm32_hmp_info_irq, #else - .mhandler.cmd =3D hmp_info_irq, + .cmd =3D hmp_info_irq, #endif }, =20 @@ -200,11 +200,11 @@ ETEXI .params =3D "", .help =3D "show i8259 (PIC) state", #ifdef TARGET_SPARC - .mhandler.cmd =3D sun4m_hmp_info_pic, + .cmd =3D sun4m_hmp_info_pic, #elif defined(TARGET_LM32) - .mhandler.cmd =3D lm32_hmp_info_pic, + .cmd =3D lm32_hmp_info_pic, #else - .mhandler.cmd =3D hmp_info_pic, + .cmd =3D hmp_info_pic, #endif }, #endif @@ -220,7 +220,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show PCI info", - .mhandler.cmd =3D hmp_info_pci, + .cmd =3D hmp_info_pci, }, =20 STEXI @@ -236,7 +236,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show virtual to physical memory mappings", - .mhandler.cmd =3D hmp_info_tlb, + .cmd =3D hmp_info_tlb, }, #endif =20 @@ -252,7 +252,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the active virtual memory mappings", - .mhandler.cmd =3D hmp_info_mem, + .cmd =3D hmp_info_mem, }, #endif =20 @@ -267,7 +267,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show memory tree", - .mhandler.cmd =3D hmp_info_mtree, + .cmd =3D hmp_info_mtree, }, =20 STEXI @@ -281,7 +281,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show dynamic compiler info", - .mhandler.cmd =3D hmp_info_jit, + .cmd =3D hmp_info_jit, }, =20 STEXI @@ -295,7 +295,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show dynamic compiler opcode counters", - .mhandler.cmd =3D hmp_info_opcount, + .cmd =3D hmp_info_opcount, }, =20 STEXI @@ -309,7 +309,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show KVM information", - .mhandler.cmd =3D hmp_info_kvm, + .cmd =3D hmp_info_kvm, }, =20 STEXI @@ -323,7 +323,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show NUMA information", - .mhandler.cmd =3D hmp_info_numa, + .cmd =3D hmp_info_numa, }, =20 STEXI @@ -337,7 +337,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show guest USB devices", - .mhandler.cmd =3D hmp_info_usb, + .cmd =3D hmp_info_usb, }, =20 STEXI @@ -351,7 +351,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show host USB devices", - .mhandler.cmd =3D hmp_info_usbhost, + .cmd =3D hmp_info_usbhost, }, =20 STEXI @@ -365,7 +365,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show profiling information", - .mhandler.cmd =3D hmp_info_profile, + .cmd =3D hmp_info_profile, }, =20 STEXI @@ -379,7 +379,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show capture information", - .mhandler.cmd =3D hmp_info_capture, + .cmd =3D hmp_info_capture, }, =20 STEXI @@ -393,7 +393,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the currently saved VM snapshots", - .mhandler.cmd =3D hmp_info_snapshots, + .cmd =3D hmp_info_snapshots, }, =20 STEXI @@ -407,7 +407,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the current VM status (running|paused)", - .mhandler.cmd =3D hmp_info_status, + .cmd =3D hmp_info_status, }, =20 STEXI @@ -421,7 +421,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show which guest mouse is receiving events", - .mhandler.cmd =3D hmp_info_mice, + .cmd =3D hmp_info_mice, }, =20 STEXI @@ -435,7 +435,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the vnc server status", - .mhandler.cmd =3D hmp_info_vnc, + .cmd =3D hmp_info_vnc, }, =20 STEXI @@ -450,7 +450,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the spice server status", - .mhandler.cmd =3D hmp_info_spice, + .cmd =3D hmp_info_spice, }, #endif =20 @@ -465,7 +465,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the current VM name", - .mhandler.cmd =3D hmp_info_name, + .cmd =3D hmp_info_name, }, =20 STEXI @@ -479,7 +479,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the current VM UUID", - .mhandler.cmd =3D hmp_info_uuid, + .cmd =3D hmp_info_uuid, }, =20 STEXI @@ -493,7 +493,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show CPU statistics", - .mhandler.cmd =3D hmp_info_cpustats, + .cmd =3D hmp_info_cpustats, }, =20 STEXI @@ -508,7 +508,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show user network stack connection states", - .mhandler.cmd =3D hmp_info_usernet, + .cmd =3D hmp_info_usernet, }, #endif =20 @@ -523,7 +523,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show migration status", - .mhandler.cmd =3D hmp_info_migrate, + .cmd =3D hmp_info_migrate, }, =20 STEXI @@ -537,7 +537,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show current migration capabilities", - .mhandler.cmd =3D hmp_info_migrate_capabilities, + .cmd =3D hmp_info_migrate_capabilities, }, =20 STEXI @@ -551,7 +551,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show current migration parameters", - .mhandler.cmd =3D hmp_info_migrate_parameters, + .cmd =3D hmp_info_migrate_parameters, }, =20 STEXI @@ -565,7 +565,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show current migration xbzrle cache size", - .mhandler.cmd =3D hmp_info_migrate_cache_size, + .cmd =3D hmp_info_migrate_cache_size, }, =20 STEXI @@ -579,7 +579,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show balloon information", - .mhandler.cmd =3D hmp_info_balloon, + .cmd =3D hmp_info_balloon, }, =20 STEXI @@ -593,7 +593,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show device tree", - .mhandler.cmd =3D hmp_info_qtree, + .cmd =3D hmp_info_qtree, }, =20 STEXI @@ -607,7 +607,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show qdev device model list", - .mhandler.cmd =3D hmp_info_qdm, + .cmd =3D hmp_info_qdm, }, =20 STEXI @@ -621,7 +621,7 @@ ETEXI .args_type =3D "path:s?", .params =3D "[path]", .help =3D "show QOM composition tree", - .mhandler.cmd =3D hmp_info_qom_tree, + .cmd =3D hmp_info_qom_tree, }, =20 STEXI @@ -635,7 +635,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show roms", - .mhandler.cmd =3D hmp_info_roms, + .cmd =3D hmp_info_roms, }, =20 STEXI @@ -649,7 +649,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show available trace-events & their state", - .mhandler.cmd =3D hmp_info_trace_events, + .cmd =3D hmp_info_trace_events, }, =20 STEXI @@ -663,7 +663,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show the TPM device", - .mhandler.cmd =3D hmp_info_tpm, + .cmd =3D hmp_info_tpm, }, =20 STEXI @@ -677,7 +677,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show memory backends", - .mhandler.cmd =3D hmp_info_memdev, + .cmd =3D hmp_info_memdev, }, =20 STEXI @@ -691,7 +691,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show memory devices", - .mhandler.cmd =3D hmp_info_memory_devices, + .cmd =3D hmp_info_memory_devices, }, =20 STEXI @@ -705,7 +705,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "show iothreads", - .mhandler.cmd =3D hmp_info_iothreads, + .cmd =3D hmp_info_iothreads, }, =20 STEXI @@ -719,7 +719,7 @@ ETEXI .args_type =3D "name:s", .params =3D "name", .help =3D "Show rocker switch", - .mhandler.cmd =3D hmp_rocker, + .cmd =3D hmp_rocker, }, =20 STEXI @@ -733,7 +733,7 @@ ETEXI .args_type =3D "name:s", .params =3D "name", .help =3D "Show rocker ports", - .mhandler.cmd =3D hmp_rocker_ports, + .cmd =3D hmp_rocker_ports, }, =20 STEXI @@ -747,7 +747,7 @@ ETEXI .args_type =3D "name:s,tbl_id:i?", .params =3D "name [tbl_id]", .help =3D "Show rocker OF-DPA flow tables", - .mhandler.cmd =3D hmp_rocker_of_dpa_flows, + .cmd =3D hmp_rocker_of_dpa_flows, }, =20 STEXI @@ -761,7 +761,7 @@ ETEXI .args_type =3D "name:s,type:i?", .params =3D "name [type]", .help =3D "Show rocker OF-DPA groups", - .mhandler.cmd =3D hmp_rocker_of_dpa_groups, + .cmd =3D hmp_rocker_of_dpa_groups, }, =20 STEXI @@ -776,7 +776,7 @@ ETEXI .args_type =3D "addr:l", .params =3D "address", .help =3D "Display the value of a storage key", - .mhandler.cmd =3D hmp_info_skeys, + .cmd =3D hmp_info_skeys, }, #endif =20 @@ -791,7 +791,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "Display the latest dump status", - .mhandler.cmd =3D hmp_info_dump, + .cmd =3D hmp_info_dump, }, =20 STEXI @@ -805,7 +805,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "Show information about hotpluggable CPUs", - .mhandler.cmd =3D hmp_hotpluggable_cpus, + .cmd =3D hmp_hotpluggable_cpus, }, =20 STEXI diff --git a/hmp-commands.hx b/hmp-commands.hx index 98b4b1a..5e068c0 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -14,7 +14,7 @@ ETEXI .args_type =3D "name:S?", .params =3D "[cmd]", .help =3D "show the help", - .mhandler.cmd =3D do_help_cmd, + .cmd =3D do_help_cmd, }, =20 STEXI @@ -28,7 +28,7 @@ ETEXI .args_type =3D "device:B", .params =3D "device|all", .help =3D "commit changes to the disk images (if -snapshot= is used) or backing files", - .mhandler.cmd =3D hmp_commit, + .cmd =3D hmp_commit, }, =20 STEXI @@ -47,7 +47,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "quit the emulator", - .mhandler.cmd =3D hmp_quit, + .cmd =3D hmp_quit, }, =20 STEXI @@ -61,7 +61,7 @@ ETEXI .args_type =3D "device:B,size:o", .params =3D "device size", .help =3D "resize a block image", - .mhandler.cmd =3D hmp_block_resize, + .cmd =3D hmp_block_resize, }, =20 STEXI @@ -78,7 +78,7 @@ ETEXI .args_type =3D "device:B,speed:o?,base:s?", .params =3D "device [speed [base]]", .help =3D "copy data from a backing file into a block devi= ce", - .mhandler.cmd =3D hmp_block_stream, + .cmd =3D hmp_block_stream, }, =20 STEXI @@ -92,7 +92,7 @@ ETEXI .args_type =3D "device:B,speed:o", .params =3D "device speed", .help =3D "set maximum speed for a background block operat= ion", - .mhandler.cmd =3D hmp_block_job_set_speed, + .cmd =3D hmp_block_job_set_speed, }, =20 STEXI @@ -107,7 +107,7 @@ ETEXI .params =3D "[-f] device", .help =3D "stop an active background block operation (use = -f" "\n\t\t\t if the operation is currently paused)", - .mhandler.cmd =3D hmp_block_job_cancel, + .cmd =3D hmp_block_job_cancel, }, =20 STEXI @@ -121,7 +121,7 @@ ETEXI .args_type =3D "device:B", .params =3D "device", .help =3D "stop an active background block operation", - .mhandler.cmd =3D hmp_block_job_complete, + .cmd =3D hmp_block_job_complete, }, =20 STEXI @@ -136,7 +136,7 @@ ETEXI .args_type =3D "device:B", .params =3D "device", .help =3D "pause an active background block operation", - .mhandler.cmd =3D hmp_block_job_pause, + .cmd =3D hmp_block_job_pause, }, =20 STEXI @@ -150,7 +150,7 @@ ETEXI .args_type =3D "device:B", .params =3D "device", .help =3D "resume a paused background block operation", - .mhandler.cmd =3D hmp_block_job_resume, + .cmd =3D hmp_block_job_resume, }, =20 STEXI @@ -164,7 +164,7 @@ ETEXI .args_type =3D "force:-f,device:B", .params =3D "[-f] device", .help =3D "eject a removable medium (use -f to force it)", - .mhandler.cmd =3D hmp_eject, + .cmd =3D hmp_eject, }, =20 STEXI @@ -178,7 +178,7 @@ ETEXI .args_type =3D "id:B", .params =3D "device", .help =3D "remove host block device", - .mhandler.cmd =3D hmp_drive_del, + .cmd =3D hmp_drive_del, }, =20 STEXI @@ -197,7 +197,7 @@ ETEXI .args_type =3D "device:B,target:F,arg:s?,read-only-mode:s?", .params =3D "device filename [format [read-only-mode]]", .help =3D "change a removable medium, optional format", - .mhandler.cmd =3D hmp_change, + .cmd =3D hmp_change, }, =20 STEXI @@ -256,7 +256,7 @@ ETEXI .args_type =3D "filename:F", .params =3D "filename", .help =3D "save screen into PPM image 'filename'", - .mhandler.cmd =3D hmp_screendump, + .cmd =3D hmp_screendump, }, =20 STEXI @@ -270,7 +270,7 @@ ETEXI .args_type =3D "filename:F", .params =3D "filename", .help =3D "output logs to 'filename'", - .mhandler.cmd =3D hmp_logfile, + .cmd =3D hmp_logfile, }, =20 STEXI @@ -284,7 +284,7 @@ ETEXI .args_type =3D "name:s,option:b", .params =3D "name on|off", .help =3D "changes status of a specific trace event", - .mhandler.cmd =3D hmp_trace_event, + .cmd =3D hmp_trace_event, .command_completion =3D trace_event_completion, }, =20 @@ -300,7 +300,7 @@ ETEXI .args_type =3D "op:s?,arg:F?", .params =3D "on|off|flush|set [arg]", .help =3D "open, close, or flush trace file, or set a new = file name", - .mhandler.cmd =3D hmp_trace_file, + .cmd =3D hmp_trace_file, }, =20 STEXI @@ -315,7 +315,7 @@ ETEXI .args_type =3D "items:s", .params =3D "item1[,...]", .help =3D "activate logging of the specified items", - .mhandler.cmd =3D hmp_log, + .cmd =3D hmp_log, }, =20 STEXI @@ -329,7 +329,7 @@ ETEXI .args_type =3D "name:s?", .params =3D "[tag|id]", .help =3D "save a VM snapshot. If no tag or id are provide= d, a new snapshot is created", - .mhandler.cmd =3D hmp_savevm, + .cmd =3D hmp_savevm, }, =20 STEXI @@ -346,7 +346,7 @@ ETEXI .args_type =3D "name:s", .params =3D "tag|id", .help =3D "restore a VM snapshot from its tag or id", - .mhandler.cmd =3D hmp_loadvm, + .cmd =3D hmp_loadvm, .command_completion =3D loadvm_completion, }, =20 @@ -362,7 +362,7 @@ ETEXI .args_type =3D "name:s", .params =3D "tag|id", .help =3D "delete a VM snapshot from its tag or id", - .mhandler.cmd =3D hmp_delvm, + .cmd =3D hmp_delvm, .command_completion =3D delvm_completion, }, =20 @@ -377,7 +377,7 @@ ETEXI .args_type =3D "option:s?", .params =3D "[on|off]", .help =3D "run emulation in singlestep mode or switch to n= ormal mode", - .mhandler.cmd =3D hmp_singlestep, + .cmd =3D hmp_singlestep, }, =20 STEXI @@ -392,7 +392,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "stop emulation", - .mhandler.cmd =3D hmp_stop, + .cmd =3D hmp_stop, }, =20 STEXI @@ -406,7 +406,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "resume emulation", - .mhandler.cmd =3D hmp_cont, + .cmd =3D hmp_cont, }, =20 STEXI @@ -420,7 +420,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "wakeup guest from suspend", - .mhandler.cmd =3D hmp_system_wakeup, + .cmd =3D hmp_system_wakeup, }, =20 STEXI @@ -434,7 +434,7 @@ ETEXI .args_type =3D "device:s?", .params =3D "[device]", .help =3D "start gdbserver on given device (default 'tcp::= 1234'), stop with 'none'", - .mhandler.cmd =3D hmp_gdbserver, + .cmd =3D hmp_gdbserver, }, =20 STEXI @@ -448,7 +448,7 @@ ETEXI .args_type =3D "fmt:/,addr:l", .params =3D "/fmt addr", .help =3D "virtual memory dump starting at 'addr'", - .mhandler.cmd =3D hmp_memory_dump, + .cmd =3D hmp_memory_dump, }, =20 STEXI @@ -462,7 +462,7 @@ ETEXI .args_type =3D "fmt:/,addr:l", .params =3D "/fmt addr", .help =3D "physical memory dump starting at 'addr'", - .mhandler.cmd =3D hmp_physical_memory_dump, + .cmd =3D hmp_physical_memory_dump, }, =20 STEXI @@ -529,7 +529,7 @@ ETEXI .args_type =3D "fmt:/,val:l", .params =3D "/fmt expr", .help =3D "print expression value (use $reg for CPU regist= er access)", - .mhandler.cmd =3D do_print, + .cmd =3D do_print, }, =20 STEXI @@ -544,7 +544,7 @@ ETEXI .args_type =3D "fmt:/,addr:i,index:i.", .params =3D "/fmt addr", .help =3D "I/O port read", - .mhandler.cmd =3D hmp_ioport_read, + .cmd =3D hmp_ioport_read, }, =20 STEXI @@ -558,7 +558,7 @@ ETEXI .args_type =3D "fmt:/,addr:i,val:i", .params =3D "/fmt addr value", .help =3D "I/O port write", - .mhandler.cmd =3D hmp_ioport_write, + .cmd =3D hmp_ioport_write, }, =20 STEXI @@ -572,7 +572,7 @@ ETEXI .args_type =3D "keys:s,hold-time:i?", .params =3D "keys [hold_ms]", .help =3D "send keys to the VM (e.g. 'sendkey ctrl-alt-f1'= , default hold time=3D100 ms)", - .mhandler.cmd =3D hmp_sendkey, + .cmd =3D hmp_sendkey, .command_completion =3D sendkey_completion, }, =20 @@ -595,7 +595,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "reset the system", - .mhandler.cmd =3D hmp_system_reset, + .cmd =3D hmp_system_reset, }, =20 STEXI @@ -609,7 +609,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "send system power down event", - .mhandler.cmd =3D hmp_system_powerdown, + .cmd =3D hmp_system_powerdown, }, =20 STEXI @@ -623,7 +623,7 @@ ETEXI .args_type =3D "start:i,size:i", .params =3D "addr size", .help =3D "compute the checksum of a memory region", - .mhandler.cmd =3D hmp_sum, + .cmd =3D hmp_sum, }, =20 STEXI @@ -637,7 +637,7 @@ ETEXI .args_type =3D "devname:s", .params =3D "device", .help =3D "add USB device (e.g. 'host:bus.addr' or 'host:v= endor_id:product_id')", - .mhandler.cmd =3D hmp_usb_add, + .cmd =3D hmp_usb_add, }, =20 STEXI @@ -652,7 +652,7 @@ ETEXI .args_type =3D "devname:s", .params =3D "device", .help =3D "remove USB device 'bus.addr'", - .mhandler.cmd =3D hmp_usb_del, + .cmd =3D hmp_usb_del, }, =20 STEXI @@ -668,7 +668,7 @@ ETEXI .args_type =3D "device:O", .params =3D "driver[,prop=3Dvalue][,...]", .help =3D "add device, like -device on the command line", - .mhandler.cmd =3D hmp_device_add, + .cmd =3D hmp_device_add, .command_completion =3D device_add_completion, }, =20 @@ -683,7 +683,7 @@ ETEXI .args_type =3D "id:s", .params =3D "device", .help =3D "remove device", - .mhandler.cmd =3D hmp_device_del, + .cmd =3D hmp_device_del, .command_completion =3D device_del_completion, }, =20 @@ -699,7 +699,7 @@ ETEXI .args_type =3D "index:i", .params =3D "index", .help =3D "set the default CPU", - .mhandler.cmd =3D hmp_cpu, + .cmd =3D hmp_cpu, }, =20 STEXI @@ -713,7 +713,7 @@ ETEXI .args_type =3D "dx_str:s,dy_str:s,dz_str:s?", .params =3D "dx dy [dz]", .help =3D "send mouse move events", - .mhandler.cmd =3D hmp_mouse_move, + .cmd =3D hmp_mouse_move, }, =20 STEXI @@ -728,7 +728,7 @@ ETEXI .args_type =3D "button_state:i", .params =3D "state", .help =3D "change mouse button state (1=3DL, 2=3DM, 4=3DR)= ", - .mhandler.cmd =3D hmp_mouse_button, + .cmd =3D hmp_mouse_button, }, =20 STEXI @@ -742,7 +742,7 @@ ETEXI .args_type =3D "index:i", .params =3D "index", .help =3D "set which mouse device receives events", - .mhandler.cmd =3D hmp_mouse_set, + .cmd =3D hmp_mouse_set, }, =20 STEXI @@ -760,7 +760,7 @@ ETEXI .args_type =3D "path:F,freq:i?,bits:i?,nchannels:i?", .params =3D "path [frequency [bits [channels]]]", .help =3D "capture audio to a wave file (default frequency= =3D44100 bits=3D16 channels=3D2)", - .mhandler.cmd =3D hmp_wavcapture, + .cmd =3D hmp_wavcapture, }, STEXI @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{chann= els}]]] @@ -781,7 +781,7 @@ ETEXI .args_type =3D "n:i", .params =3D "capture index", .help =3D "stop capture", - .mhandler.cmd =3D hmp_stopcapture, + .cmd =3D hmp_stopcapture, }, STEXI @item stopcapture @var{index} @@ -797,7 +797,7 @@ ETEXI .args_type =3D "val:l,size:i,filename:s", .params =3D "addr size file", .help =3D "save to disk virtual memory dump starting at 'a= ddr' of size 'size'", - .mhandler.cmd =3D hmp_memsave, + .cmd =3D hmp_memsave, }, =20 STEXI @@ -811,7 +811,7 @@ ETEXI .args_type =3D "val:l,size:i,filename:s", .params =3D "addr size file", .help =3D "save to disk physical memory dump starting at '= addr' of size 'size'", - .mhandler.cmd =3D hmp_pmemsave, + .cmd =3D hmp_pmemsave, }, =20 STEXI @@ -825,7 +825,7 @@ ETEXI .args_type =3D "bootdevice:s", .params =3D "bootdevice", .help =3D "define new values for the boot device list", - .mhandler.cmd =3D hmp_boot_set, + .cmd =3D hmp_boot_set, }, =20 STEXI @@ -843,7 +843,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "inject an NMI", - .mhandler.cmd =3D hmp_nmi, + .cmd =3D hmp_nmi, }, STEXI @item nmi @var{cpu} @@ -857,7 +857,7 @@ ETEXI .args_type =3D "device:s,data:s", .params =3D "device data", .help =3D "Write to a ring buffer character device", - .mhandler.cmd =3D hmp_ringbuf_write, + .cmd =3D hmp_ringbuf_write, .command_completion =3D ringbuf_write_completion, }, =20 @@ -874,7 +874,7 @@ ETEXI .args_type =3D "device:s,size:i", .params =3D "device size", .help =3D "Read from a ring buffer character device", - .mhandler.cmd =3D hmp_ringbuf_read, + .cmd =3D hmp_ringbuf_read, .command_completion =3D ringbuf_write_completion, }, =20 @@ -900,7 +900,7 @@ ETEXI " full copy of disk\n\t\t\t -i for migration without " "shared storage with incremental copy of disk " "(base image shared between src and destination)", - .mhandler.cmd =3D hmp_migrate, + .cmd =3D hmp_migrate, }, =20 =20 @@ -917,7 +917,7 @@ ETEXI .args_type =3D "", .params =3D "", .help =3D "cancel the current VM migration", - .mhandler.cmd =3D hmp_migrate_cancel, + .cmd =3D hmp_migrate_cancel, }, =20 STEXI @@ -932,7 +932,7 @@ ETEXI .args_type =3D "uri:s", .params =3D "uri", .help =3D "Continue an incoming migration from an -incomin= g defer", - .mhandler.cmd =3D hmp_migrate_incoming, + .cmd =3D hmp_migrate_incoming, }, =20 STEXI @@ -953,7 +953,7 @@ ETEXI "The cache size affects the number of cache misses= ." "In case of a high cache miss ratio you need to in= crease" " the cache size", - .mhandler.cmd =3D hmp_migrate_set_cache_size, + .cmd =3D hmp_migrate_set_cache_size, }, =20 STEXI @@ -968,7 +968,7 @@ ETEXI .params =3D "value", .help =3D "set maximum speed (in bytes) for migrations. " "Defaults to MB if no size suffix is specified, ie. B/K/M/G/T", - .mhandler.cmd =3D hmp_migrate_set_speed, + .cmd =3D hmp_migrate_set_speed, }, =20 STEXI @@ -982,7 +982,7 @@ ETEXI .args_type =3D "value:T", .params =3D "value", .help =3D "set maximum tolerated downtime (in seconds) for= migrations", - .mhandler.cmd =3D hmp_migrate_set_downtime, + .cmd =3D hmp_migrate_set_downtime, }, =20 STEXI @@ -996,7 +996,7 @@ ETEXI .args_type =3D "capability:s,state:b", .params =3D "capability state", .help =3D "Enable/Disable the usage of a capability for mi= gration", - .mhandler.cmd =3D hmp_migrate_set_capability, + .cmd =3D hmp_migrate_set_capability, .command_completion =3D migrate_set_capability_completion, }, =20 @@ -1011,7 +1011,7 @@ ETEXI .args_type =3D "parameter:s,value:s", .params =3D "parameter value", .help =3D "Set the parameter for migration", - .mhandler.cmd =3D hmp_migrate_set_parameter, + .cmd =3D hmp_migrate_set_parameter, .command_completion =3D migrate_set_parameter_completion, }, =20 @@ -1028,7 +1028,7 @@ ETEXI .help =3D "Followup to a migration command to switch the m= igration" " to postcopy mode. The postcopy-ram capability mu= st " "be set before the original migration command.", - .mhandler.cmd =3D hmp_migrate_start_postcopy, + .cmd =3D hmp_migrate_start_postcopy, }, =20 STEXI @@ -1043,7 +1043,7 @@ ETEXI .args_type =3D "protocol:s,hostname:s,port:i?,tls-port:i?,cert-= subject:s?", .params =3D "protocol hostname port tls-port cert-subject", .help =3D "set migration information for remote display", - .mhandler.cmd =3D hmp_client_migrate_info, + .cmd =3D hmp_client_migrate_info, }, =20 STEXI @@ -1066,7 +1066,7 @@ ETEXI "-s: dump in kdump-compressed format, with snappy = compression.\n\t\t\t" "begin: the starting physical address.\n\t\t\t" "length: the memory size, in bytes.", - .mhandler.cmd =3D hmp_dump_guest_memory, + .cmd =3D hmp_dump_guest_memory, }, =20 =20 @@ -1093,7 +1093,7 @@ ETEXI .args_type =3D "filename:F", .params =3D "", .help =3D "Save guest storage keys into file 'filename'.\n= ", - .mhandler.cmd =3D hmp_dump_skeys, + .cmd =3D hmp_dump_skeys, }, #endif =20 @@ -1115,7 +1115,7 @@ ETEXI "The default format is qcow2. The -n flag request= s QEMU\n\t\t\t" "to reuse the image found in new-image-file, inste= ad of\n\t\t\t" "recreating it from scratch.", - .mhandler.cmd =3D hmp_snapshot_blkdev, + .cmd =3D hmp_snapshot_blkdev, }, =20 STEXI @@ -1131,7 +1131,7 @@ ETEXI .help =3D "take an internal snapshot of device.\n\t\t\t" "The format of the image used by device must\n\t\t= \t" "support it, such as qcow2.\n\t\t\t", - .mhandler.cmd =3D hmp_snapshot_blkdev_internal, + .cmd =3D hmp_snapshot_blkdev_internal, }, =20 STEXI @@ -1149,7 +1149,7 @@ ETEXI "the snapshot matching both id and name.\n\t\t\t" "The format of the image used by device must\n\t\t= \t" "support it, such as qcow2.\n\t\t\t", - .mhandler.cmd =3D hmp_snapshot_delete_blkdev_internal, + .cmd =3D hmp_snapshot_delete_blkdev_internal, }, =20 STEXI @@ -1170,7 +1170,7 @@ ETEXI "in new-image-file, instead of recreating it from = scratch.\n\t\t\t" "The -f flag requests QEMU to copy the whole disk,= \n\t\t\t" "so that the result does not need a backing file.\= n\t\t\t", - .mhandler.cmd =3D hmp_drive_mirror, + .cmd =3D hmp_drive_mirror, }, STEXI @item drive_mirror @@ -1191,7 +1191,7 @@ ETEXI "in new-image-file, instead of recreating it from = scratch.\n\t\t\t" "The -f flag requests QEMU to copy the whole disk,= \n\t\t\t" "so that the result does not need a backing file.\= n\t\t\t", - .mhandler.cmd =3D hmp_drive_backup, + .cmd =3D hmp_drive_backup, }, STEXI @item drive_backup @@ -1209,7 +1209,7 @@ ETEXI "[,snapshot=3Don|off][,cache=3Don|off]\n" "[,readonly=3Don|off][,copy-on-read=3Don|off]", .help =3D "add drive to PCI storage controller", - .mhandler.cmd =3D hmp_drive_add, + .cmd =3D hmp_drive_add, }, =20 STEXI @@ -1233,7 +1233,7 @@ ETEXI " =3D error string or 32bit\n\t\t\t" " =3D 32bit x 4\n\t\t\t" " =3D 32bit x 4", - .mhandler.cmd =3D hmp_pcie_aer_inject_error, + .cmd =3D hmp_pcie_aer_inject_error, }, =20 STEXI @@ -1247,7 +1247,7 @@ ETEXI .args_type =3D "device:s,opts:s?", .params =3D "tap|user|socket|vde|netmap|bridge|vhost-user|du= mp [options]", .help =3D "add host VLAN client", - .mhandler.cmd =3D hmp_host_net_add, + .cmd =3D hmp_host_net_add, .command_completion =3D host_net_add_completion, }, =20 @@ -1262,7 +1262,7 @@ ETEXI .args_type =3D "vlan_id:i,device:s", .params =3D "vlan_id name", .help =3D "remove host VLAN client", - .mhandler.cmd =3D hmp_host_net_remove, + .cmd =3D hmp_host_net_remove, .command_completion =3D host_net_remove_completion, }, =20 @@ -1277,7 +1277,7 @@ ETEXI .args_type =3D "netdev:O", .params =3D "[user|tap|socket|vde|bridge|hubport|netmap|vhos= t-user],id=3Dstr[,prop=3Dvalue][,...]", .help =3D "add host network device", - .mhandler.cmd =3D hmp_netdev_add, + .cmd =3D hmp_netdev_add, .command_completion =3D netdev_add_completion, }, =20 @@ -1292,7 +1292,7 @@ ETEXI .args_type =3D "id:s", .params =3D "id", .help =3D "remove host network device", - .mhandler.cmd =3D hmp_netdev_del, + .cmd =3D hmp_netdev_del, .command_completion =3D netdev_del_completion, }, =20 @@ -1307,7 +1307,7 @@ ETEXI .args_type =3D "object:O", .params =3D "[qom-type=3D]type,id=3Dstr[,prop=3Dvalue][,...]= ", .help =3D "create QOM object", - .mhandler.cmd =3D hmp_object_add, + .cmd =3D hmp_object_add, .command_completion =3D object_add_completion, }, =20 @@ -1322,7 +1322,7 @@ ETEXI .args_type =3D "id:s", .params =3D "id", .help =3D "destroy QOM object", - .mhandler.cmd =3D hmp_object_del, + .cmd =3D hmp_object_del, .command_completion =3D object_del_completion, }, =20 @@ -1338,7 +1338,7 @@ ETEXI .args_type =3D "arg1:s,arg2:s?,arg3:s?", .params =3D "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[g= uestaddr]:guestport", .help =3D "redirect TCP or UDP connections from host to gu= est (requires -net user)", - .mhandler.cmd =3D hmp_hostfwd_add, + .cmd =3D hmp_hostfwd_add, }, #endif STEXI @@ -1353,7 +1353,7 @@ ETEXI .args_type =3D "arg1:s,arg2:s?,arg3:s?", .params =3D "[vlan_id name] [tcp|udp]:[hostaddr]:hostport", .help =3D "remove host-to-guest TCP or UDP redirection", - .mhandler.cmd =3D hmp_hostfwd_remove, + .cmd =3D hmp_hostfwd_remove, }, =20 #endif @@ -1368,7 +1368,7 @@ ETEXI .args_type =3D "value:M", .params =3D "target", .help =3D "request VM to change its memory allocation (in = MB)", - .mhandler.cmd =3D hmp_balloon, + .cmd =3D hmp_balloon, }, =20 STEXI @@ -1382,7 +1382,7 @@ ETEXI .args_type =3D "name:s,up:b", .params =3D "name on|off", .help =3D "change the link status of a network adapter", - .mhandler.cmd =3D hmp_set_link, + .cmd =3D hmp_set_link, .command_completion =3D set_link_completion, }, =20 @@ -1397,7 +1397,7 @@ ETEXI .args_type =3D "action:s", .params =3D "[reset|shutdown|poweroff|pause|debug|none]", .help =3D "change watchdog action", - .mhandler.cmd =3D hmp_watchdog_action, + .cmd =3D hmp_watchdog_action, .command_completion =3D watchdog_action_completion, }, =20 @@ -1412,7 +1412,7 @@ ETEXI .args_type =3D "aclname:s", .params =3D "aclname", .help =3D "list rules in the access control list", - .mhandler.cmd =3D hmp_acl_show, + .cmd =3D hmp_acl_show, }, =20 STEXI @@ -1429,7 +1429,7 @@ ETEXI .args_type =3D "aclname:s,policy:s", .params =3D "aclname allow|deny", .help =3D "set default access control list policy", - .mhandler.cmd =3D hmp_acl_policy, + .cmd =3D hmp_acl_policy, }, =20 STEXI @@ -1445,7 +1445,7 @@ ETEXI .args_type =3D "aclname:s,match:s,policy:s,index:i?", .params =3D "aclname match allow|deny [index]", .help =3D "add a match rule to the access control list", - .mhandler.cmd =3D hmp_acl_add, + .cmd =3D hmp_acl_add, }, =20 STEXI @@ -1464,7 +1464,7 @@ ETEXI .args_type =3D "aclname:s,match:s", .params =3D "aclname match", .help =3D "remove a match rule from the access control lis= t", - .mhandler.cmd =3D hmp_acl_remove, + .cmd =3D hmp_acl_remove, }, =20 STEXI @@ -1478,7 +1478,7 @@ ETEXI .args_type =3D "aclname:s", .params =3D "aclname", .help =3D "reset the access control list", - .mhandler.cmd =3D hmp_acl_reset, + .cmd =3D hmp_acl_reset, }, =20 STEXI @@ -1493,7 +1493,7 @@ ETEXI .args_type =3D "all:-a,writable:-w,uri:s", .params =3D "nbd_server_start [-a] [-w] host:port", .help =3D "serve block devices on the given host and port"= , - .mhandler.cmd =3D hmp_nbd_server_start, + .cmd =3D hmp_nbd_server_start, }, STEXI @item nbd_server_start @var{host}:@var{port} @@ -1509,7 +1509,7 @@ ETEXI .args_type =3D "writable:-w,device:B", .params =3D "nbd_server_add [-w] device", .help =3D "export a block device via NBD", - .mhandler.cmd =3D hmp_nbd_server_add, + .cmd =3D hmp_nbd_server_add, }, STEXI @item nbd_server_add @var{device} @@ -1524,7 +1524,7 @@ ETEXI .args_type =3D "", .params =3D "nbd_server_stop", .help =3D "stop serving block devices using the NBD protoc= ol", - .mhandler.cmd =3D hmp_nbd_server_stop, + .cmd =3D hmp_nbd_server_stop, }, STEXI @item nbd_server_stop @@ -1540,7 +1540,7 @@ ETEXI .args_type =3D "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_st= atus:l,addr:l,misc:l", .params =3D "[-b] cpu bank status mcgstatus addr misc", .help =3D "inject a MCE on the given CPU [and broadcast to= other CPUs with -b option]", - .mhandler.cmd =3D hmp_mce, + .cmd =3D hmp_mce, }, =20 #endif @@ -1555,7 +1555,7 @@ ETEXI .args_type =3D "fdname:s", .params =3D "getfd name", .help =3D "receive a file descriptor via SCM rights and as= sign it a name", - .mhandler.cmd =3D hmp_getfd, + .cmd =3D hmp_getfd, }, =20 STEXI @@ -1571,7 +1571,7 @@ ETEXI .args_type =3D "fdname:s", .params =3D "closefd name", .help =3D "close a file descriptor previously passed via S= CM rights", - .mhandler.cmd =3D hmp_closefd, + .cmd =3D hmp_closefd, }, =20 STEXI @@ -1587,7 +1587,7 @@ ETEXI .args_type =3D "device:B,password:s", .params =3D "block_passwd device password", .help =3D "set the password of encrypted block devices", - .mhandler.cmd =3D hmp_block_passwd, + .cmd =3D hmp_block_passwd, }, =20 STEXI @@ -1601,7 +1601,7 @@ ETEXI .args_type =3D "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd= :l,iops_wr:l", .params =3D "device bps bps_rd bps_wr iops iops_rd iops_wr", .help =3D "change I/O throttle limits for a block drive", - .mhandler.cmd =3D hmp_block_set_io_throttle, + .cmd =3D hmp_block_set_io_throttle, }, =20 STEXI @@ -1615,7 +1615,7 @@ ETEXI .args_type =3D "protocol:s,password:s,connected:s?", .params =3D "protocol password action-if-connected", .help =3D "set spice/vnc password", - .mhandler.cmd =3D hmp_set_password, + .cmd =3D hmp_set_password, }, =20 STEXI @@ -1634,7 +1634,7 @@ ETEXI .args_type =3D "protocol:s,time:s", .params =3D "protocol time", .help =3D "set spice/vnc password expire-time", - .mhandler.cmd =3D hmp_expire_password, + .cmd =3D hmp_expire_password, }, =20 STEXI @@ -1665,7 +1665,7 @@ ETEXI .args_type =3D "args:s", .params =3D "args", .help =3D "add chardev", - .mhandler.cmd =3D hmp_chardev_add, + .cmd =3D hmp_chardev_add, .command_completion =3D chardev_add_completion, }, =20 @@ -1681,7 +1681,7 @@ ETEXI .args_type =3D "id:s", .params =3D "id", .help =3D "remove chardev", - .mhandler.cmd =3D hmp_chardev_remove, + .cmd =3D hmp_chardev_remove, .command_completion =3D chardev_remove_completion, }, =20 @@ -1697,7 +1697,7 @@ ETEXI .args_type =3D "device:B,command:s", .params =3D "[device] \"[command]\"", .help =3D "run a qemu-io command on a block device", - .mhandler.cmd =3D hmp_qemu_io, + .cmd =3D hmp_qemu_io, }, =20 STEXI @@ -1712,7 +1712,7 @@ ETEXI .args_type =3D "id:i", .params =3D "id", .help =3D "add cpu", - .mhandler.cmd =3D hmp_cpu_add, + .cmd =3D hmp_cpu_add, }, =20 STEXI @@ -1726,7 +1726,7 @@ ETEXI .args_type =3D "path:s?", .params =3D "path", .help =3D "list QOM properties", - .mhandler.cmd =3D hmp_qom_list, + .cmd =3D hmp_qom_list, }, =20 STEXI @@ -1739,7 +1739,7 @@ ETEXI .args_type =3D "path:s,property:s,value:s", .params =3D "path property value", .help =3D "set QOM property", - .mhandler.cmd =3D hmp_qom_set, + .cmd =3D hmp_qom_set, }, =20 STEXI @@ -1752,7 +1752,7 @@ ETEXI .args_type =3D "item:s?", .params =3D "[subcommand]", .help =3D "show various information about the system state= ", - .mhandler.cmd =3D hmp_info_help, + .cmd =3D hmp_info_help, .sub_table =3D info_cmds, }, =20 diff --git a/monitor.c b/monitor.c index 1dadc2a..71512e4 100644 --- a/monitor.c +++ b/monitor.c @@ -130,13 +130,10 @@ typedef struct mon_cmd_t { const char *args_type; const char *params; const char *help; - union { - void (*cmd)(Monitor *mon, const QDict *qdict); - void (*cmd_new)(QDict *params, QObject **ret_data, Error **errp)= ; - } mhandler; + void (*cmd)(Monitor *mon, const QDict *qdict); /* @sub_table is a list of 2nd level of commands. If it do not exist= , - * mhandler should be used. If it exist, sub_table[?].mhandler shoul= d be - * used, and mhandler of 1st level plays the role of help function. + * cmd should be used. If it exist, sub_table[?].cmd should be + * used, and cmd of 1st level plays the role of help function. */ struct mon_cmd_t *sub_table; void (*command_completion)(ReadLineState *rs, int nb_args, const cha= r *str); @@ -2927,7 +2924,7 @@ static void handle_hmp_command(Monitor *mon, const = char *cmdline) return; } =20 - cmd->mhandler.cmd(mon, qdict); + cmd->cmd(mon, qdict); QDECREF(qdict); } =20 --=20 2.9.0