hmp: Name HMP command handler functions hmp_COMMAND()

Some are called do_COMMAND() (old ones, usually), some hmp_COMMAND(),
and sometimes COMMAND pointlessly differs in spelling.

Normalize to hmp_COMMAND(), where COMMAND is exactly the command name
with '-' replaced by '_'.

Exceptions:

* do_device_add() and client_migrate_info() *not* renamed to
  hmp_device_add(), hmp_client_migrate_info(), because they're also
  QMP handlers.  They still need to be converted to QAPI.

* do_memory_dump(), do_physical_memory_dump(), do_ioport_read(),
  do_ioport_write() renamed do hmp_* instead of hmp_x(), hmp_xp(),
  hmp_i(), hmp_o(), because those names are too cryptic for my taste.

* do_info_help() renamed to hmp_info_help() instead of hmp_info(),
  because it only covers help.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
Markus Armbruster 2015-02-06 13:55:43 +01:00
parent 08d15d6c23
commit 3e5a50d64c
21 changed files with 110 additions and 110 deletions

View file

@ -101,7 +101,7 @@ static void blk_delete(BlockBackend *blk)
bdrv_unref(blk->bs); bdrv_unref(blk->bs);
blk->bs = NULL; blk->bs = NULL;
} }
/* Avoid double-remove after blk_hide_on_behalf_of_do_drive_del() */ /* Avoid double-remove after blk_hide_on_behalf_of_hmp_drive_del() */
if (blk->name[0]) { if (blk->name[0]) {
QTAILQ_REMOVE(&blk_backends, blk, link); QTAILQ_REMOVE(&blk_backends, blk, link);
} }
@ -162,7 +162,7 @@ BlockBackend *blk_next(BlockBackend *blk)
/* /*
* Return @blk's name, a non-null string. * Return @blk's name, a non-null string.
* Wart: the name is empty iff @blk has been hidden with * Wart: the name is empty iff @blk has been hidden with
* blk_hide_on_behalf_of_do_drive_del(). * blk_hide_on_behalf_of_hmp_drive_del().
*/ */
const char *blk_name(BlockBackend *blk) const char *blk_name(BlockBackend *blk)
{ {
@ -238,7 +238,7 @@ BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo)
* Strictly for use by do_drive_del(). * Strictly for use by do_drive_del().
* TODO get rid of it! * TODO get rid of it!
*/ */
void blk_hide_on_behalf_of_do_drive_del(BlockBackend *blk) void blk_hide_on_behalf_of_hmp_drive_del(BlockBackend *blk)
{ {
QTAILQ_REMOVE(&blk_backends, blk, link); QTAILQ_REMOVE(&blk_backends, blk, link);
blk->name[0] = 0; blk->name[0] = 0;

View file

@ -1025,7 +1025,7 @@ fail:
return dinfo; return dinfo;
} }
void do_commit(Monitor *mon, const QDict *qdict) void hmp_commit(Monitor *mon, const QDict *qdict)
{ {
const char *device = qdict_get_str(qdict, "device"); const char *device = qdict_get_str(qdict, "device");
BlockDriverState *bs; BlockDriverState *bs;
@ -1953,7 +1953,7 @@ void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd,
aio_context_release(aio_context); aio_context_release(aio_context);
} }
int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data) int hmp_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
{ {
const char *id = qdict_get_str(qdict, "id"); const char *id = qdict_get_str(qdict, "id");
BlockBackend *blk; BlockBackend *blk;
@ -1995,7 +1995,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data)
* then we can just get rid of the block driver state right here. * then we can just get rid of the block driver state right here.
*/ */
if (blk_get_attached_dev(blk)) { if (blk_get_attached_dev(blk)) {
blk_hide_on_behalf_of_do_drive_del(blk); blk_hide_on_behalf_of_hmp_drive_del(blk);
/* Further I/O must not pause the guest */ /* Further I/O must not pause the guest */
bdrv_set_on_error(bs, BLOCKDEV_ON_ERROR_REPORT, bdrv_set_on_error(bs, BLOCKDEV_ON_ERROR_REPORT,
BLOCKDEV_ON_ERROR_REPORT); BLOCKDEV_ON_ERROR_REPORT);

View file

@ -50,7 +50,7 @@ DriveInfo *add_init_drive(const char *optstr)
return dinfo; return dinfo;
} }
void drive_hot_add(Monitor *mon, const QDict *qdict) void hmp_drive_add(Monitor *mon, const QDict *qdict)
{ {
DriveInfo *dinfo = NULL; DriveInfo *dinfo = NULL;
const char *opts = qdict_get_str(qdict, "opts"); const char *opts = qdict_get_str(qdict, "opts");

View file

@ -28,7 +28,7 @@ ETEXI
.args_type = "device:B", .args_type = "device:B",
.params = "device|all", .params = "device|all",
.help = "commit changes to the disk images (if -snapshot is used) or backing files", .help = "commit changes to the disk images (if -snapshot is used) or backing files",
.mhandler.cmd = do_commit, .mhandler.cmd = hmp_commit,
}, },
STEXI STEXI
@ -180,7 +180,7 @@ ETEXI
.params = "device", .params = "device",
.help = "remove host block device", .help = "remove host block device",
.user_print = monitor_user_noop, .user_print = monitor_user_noop,
.mhandler.cmd_new = do_drive_del, .mhandler.cmd_new = hmp_drive_del,
}, },
STEXI STEXI
@ -245,7 +245,7 @@ ETEXI
.args_type = "filename:F", .args_type = "filename:F",
.params = "filename", .params = "filename",
.help = "save screen into PPM image 'filename'", .help = "save screen into PPM image 'filename'",
.mhandler.cmd = hmp_screen_dump, .mhandler.cmd = hmp_screendump,
}, },
STEXI STEXI
@ -259,7 +259,7 @@ ETEXI
.args_type = "filename:F", .args_type = "filename:F",
.params = "filename", .params = "filename",
.help = "output logs to 'filename'", .help = "output logs to 'filename'",
.mhandler.cmd = do_logfile, .mhandler.cmd = hmp_logfile,
}, },
STEXI STEXI
@ -273,7 +273,7 @@ ETEXI
.args_type = "name:s,option:b", .args_type = "name:s,option:b",
.params = "name on|off", .params = "name on|off",
.help = "changes status of a specific trace event", .help = "changes status of a specific trace event",
.mhandler.cmd = do_trace_event_set_state, .mhandler.cmd = hmp_trace_event,
}, },
STEXI STEXI
@ -288,7 +288,7 @@ ETEXI
.args_type = "op:s?,arg:F?", .args_type = "op:s?,arg:F?",
.params = "on|off|flush|set [arg]", .params = "on|off|flush|set [arg]",
.help = "open, close, or flush trace file, or set a new file name", .help = "open, close, or flush trace file, or set a new file name",
.mhandler.cmd = do_trace_file, .mhandler.cmd = hmp_trace_file,
}, },
STEXI STEXI
@ -303,7 +303,7 @@ ETEXI
.args_type = "items:s", .args_type = "items:s",
.params = "item1[,...]", .params = "item1[,...]",
.help = "activate logging of the specified items", .help = "activate logging of the specified items",
.mhandler.cmd = do_log, .mhandler.cmd = hmp_log,
}, },
STEXI STEXI
@ -317,7 +317,7 @@ ETEXI
.args_type = "name:s?", .args_type = "name:s?",
.params = "[tag|id]", .params = "[tag|id]",
.help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created", .help = "save a VM snapshot. If no tag or id are provided, a new snapshot is created",
.mhandler.cmd = do_savevm, .mhandler.cmd = hmp_savevm,
}, },
STEXI STEXI
@ -334,7 +334,7 @@ ETEXI
.args_type = "name:s", .args_type = "name:s",
.params = "tag|id", .params = "tag|id",
.help = "restore a VM snapshot from its tag or id", .help = "restore a VM snapshot from its tag or id",
.mhandler.cmd = do_loadvm, .mhandler.cmd = hmp_loadvm,
.command_completion = loadvm_completion, .command_completion = loadvm_completion,
}, },
@ -350,7 +350,7 @@ ETEXI
.args_type = "name:s", .args_type = "name:s",
.params = "tag|id", .params = "tag|id",
.help = "delete a VM snapshot from its tag or id", .help = "delete a VM snapshot from its tag or id",
.mhandler.cmd = do_delvm, .mhandler.cmd = hmp_delvm,
.command_completion = delvm_completion, .command_completion = delvm_completion,
}, },
@ -365,7 +365,7 @@ ETEXI
.args_type = "option:s?", .args_type = "option:s?",
.params = "[on|off]", .params = "[on|off]",
.help = "run emulation in singlestep mode or switch to normal mode", .help = "run emulation in singlestep mode or switch to normal mode",
.mhandler.cmd = do_singlestep, .mhandler.cmd = hmp_singlestep,
}, },
STEXI STEXI
@ -422,7 +422,7 @@ ETEXI
.args_type = "device:s?", .args_type = "device:s?",
.params = "[device]", .params = "[device]",
.help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'", .help = "start gdbserver on given device (default 'tcp::1234'), stop with 'none'",
.mhandler.cmd = do_gdbserver, .mhandler.cmd = hmp_gdbserver,
}, },
STEXI STEXI
@ -436,7 +436,7 @@ ETEXI
.args_type = "fmt:/,addr:l", .args_type = "fmt:/,addr:l",
.params = "/fmt addr", .params = "/fmt addr",
.help = "virtual memory dump starting at 'addr'", .help = "virtual memory dump starting at 'addr'",
.mhandler.cmd = do_memory_dump, .mhandler.cmd = hmp_memory_dump,
}, },
STEXI STEXI
@ -450,7 +450,7 @@ ETEXI
.args_type = "fmt:/,addr:l", .args_type = "fmt:/,addr:l",
.params = "/fmt addr", .params = "/fmt addr",
.help = "physical memory dump starting at 'addr'", .help = "physical memory dump starting at 'addr'",
.mhandler.cmd = do_physical_memory_dump, .mhandler.cmd = hmp_physical_memory_dump,
}, },
STEXI STEXI
@ -533,7 +533,7 @@ ETEXI
.args_type = "fmt:/,addr:i,index:i.", .args_type = "fmt:/,addr:i,index:i.",
.params = "/fmt addr", .params = "/fmt addr",
.help = "I/O port read", .help = "I/O port read",
.mhandler.cmd = do_ioport_read, .mhandler.cmd = hmp_ioport_read,
}, },
STEXI STEXI
@ -545,7 +545,7 @@ ETEXI
.args_type = "fmt:/,addr:i,val:i", .args_type = "fmt:/,addr:i,val:i",
.params = "/fmt addr value", .params = "/fmt addr value",
.help = "I/O port write", .help = "I/O port write",
.mhandler.cmd = do_ioport_write, .mhandler.cmd = hmp_ioport_write,
}, },
STEXI STEXI
@ -557,7 +557,7 @@ ETEXI
.args_type = "keys:s,hold-time:i?", .args_type = "keys:s,hold-time:i?",
.params = "keys [hold_ms]", .params = "keys [hold_ms]",
.help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)", .help = "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)",
.mhandler.cmd = hmp_send_key, .mhandler.cmd = hmp_sendkey,
.command_completion = sendkey_completion, .command_completion = sendkey_completion,
}, },
@ -611,7 +611,7 @@ ETEXI
.args_type = "start:i,size:i", .args_type = "start:i,size:i",
.params = "addr size", .params = "addr size",
.help = "compute the checksum of a memory region", .help = "compute the checksum of a memory region",
.mhandler.cmd = do_sum, .mhandler.cmd = hmp_sum,
}, },
STEXI STEXI
@ -626,7 +626,7 @@ ETEXI
.args_type = "devname:s", .args_type = "devname:s",
.params = "device", .params = "device",
.help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')", .help = "add USB device (e.g. 'host:bus.addr' or 'host:vendor_id:product_id')",
.mhandler.cmd = do_usb_add, .mhandler.cmd = hmp_usb_add,
}, },
STEXI STEXI
@ -642,7 +642,7 @@ ETEXI
.args_type = "devname:s", .args_type = "devname:s",
.params = "device", .params = "device",
.help = "remove USB device 'bus.addr'", .help = "remove USB device 'bus.addr'",
.mhandler.cmd = do_usb_del, .mhandler.cmd = hmp_usb_del,
}, },
STEXI STEXI
@ -706,7 +706,7 @@ ETEXI
.args_type = "dx_str:s,dy_str:s,dz_str:s?", .args_type = "dx_str:s,dy_str:s,dz_str:s?",
.params = "dx dy [dz]", .params = "dx dy [dz]",
.help = "send mouse move events", .help = "send mouse move events",
.mhandler.cmd = do_mouse_move, .mhandler.cmd = hmp_mouse_move,
}, },
STEXI STEXI
@ -721,7 +721,7 @@ ETEXI
.args_type = "button_state:i", .args_type = "button_state:i",
.params = "state", .params = "state",
.help = "change mouse button state (1=L, 2=M, 4=R)", .help = "change mouse button state (1=L, 2=M, 4=R)",
.mhandler.cmd = do_mouse_button, .mhandler.cmd = hmp_mouse_button,
}, },
STEXI STEXI
@ -735,7 +735,7 @@ ETEXI
.args_type = "index:i", .args_type = "index:i",
.params = "index", .params = "index",
.help = "set which mouse device receives events", .help = "set which mouse device receives events",
.mhandler.cmd = do_mouse_set, .mhandler.cmd = hmp_mouse_set,
}, },
STEXI STEXI
@ -753,7 +753,7 @@ ETEXI
.args_type = "path:F,freq:i?,bits:i?,nchannels:i?", .args_type = "path:F,freq:i?,bits:i?,nchannels:i?",
.params = "path [frequency [bits [channels]]]", .params = "path [frequency [bits [channels]]]",
.help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)", .help = "capture audio to a wave file (default frequency=44100 bits=16 channels=2)",
.mhandler.cmd = do_wav_capture, .mhandler.cmd = hmp_wavcapture,
}, },
STEXI STEXI
@item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]] @item wavcapture @var{filename} [@var{frequency} [@var{bits} [@var{channels}]]]
@ -774,7 +774,7 @@ ETEXI
.args_type = "n:i", .args_type = "n:i",
.params = "capture index", .params = "capture index",
.help = "stop capture", .help = "stop capture",
.mhandler.cmd = do_stop_capture, .mhandler.cmd = hmp_stopcapture,
}, },
STEXI STEXI
@item stopcapture @var{index} @item stopcapture @var{index}
@ -818,7 +818,7 @@ ETEXI
.args_type = "bootdevice:s", .args_type = "bootdevice:s",
.params = "bootdevice", .params = "bootdevice",
.help = "define new values for the boot device list", .help = "define new values for the boot device list",
.mhandler.cmd = do_boot_set, .mhandler.cmd = hmp_boot_set,
}, },
STEXI STEXI
@ -837,7 +837,7 @@ ETEXI
.args_type = "", .args_type = "",
.params = "", .params = "",
.help = "inject an NMI", .help = "inject an NMI",
.mhandler.cmd = hmp_inject_nmi, .mhandler.cmd = hmp_nmi,
}, },
STEXI STEXI
@item nmi @var{cpu} @item nmi @var{cpu}
@ -1140,7 +1140,7 @@ ETEXI
"[,snapshot=on|off][,cache=on|off]\n" "[,snapshot=on|off][,cache=on|off]\n"
"[,readonly=on|off][,copy-on-read=on|off]", "[,readonly=on|off][,copy-on-read=on|off]",
.help = "add drive to PCI storage controller", .help = "add drive to PCI storage controller",
.mhandler.cmd = drive_hot_add, .mhandler.cmd = hmp_drive_add,
}, },
STEXI STEXI
@ -1155,7 +1155,7 @@ ETEXI
.args_type = "pci_addr:s,type:s,opts:s?", .args_type = "pci_addr:s,type:s,opts:s?",
.params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", .params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
.help = "hot-add PCI device", .help = "hot-add PCI device",
.mhandler.cmd = pci_device_hot_add, .mhandler.cmd = hmp_pci_add,
}, },
#endif #endif
@ -1171,7 +1171,7 @@ ETEXI
.args_type = "pci_addr:s", .args_type = "pci_addr:s",
.params = "[[<domain>:]<bus>:]<slot>", .params = "[[<domain>:]<bus>:]<slot>",
.help = "hot remove PCI device", .help = "hot remove PCI device",
.mhandler.cmd = do_pci_device_hot_remove, .mhandler.cmd = hmp_pci_del,
}, },
#endif #endif
@ -1197,7 +1197,7 @@ ETEXI
"<tlb header> = 32bit x 4\n\t\t\t" "<tlb header> = 32bit x 4\n\t\t\t"
"<tlb header prefix> = 32bit x 4", "<tlb header prefix> = 32bit x 4",
.user_print = pcie_aer_inject_error_print, .user_print = pcie_aer_inject_error_print,
.mhandler.cmd_new = do_pcie_aer_inject_error, .mhandler.cmd_new = hmp_pcie_aer_inject_error,
}, },
STEXI STEXI
@ -1211,7 +1211,7 @@ ETEXI
.args_type = "device:s,opts:s?", .args_type = "device:s,opts:s?",
.params = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]", .params = "tap|user|socket|vde|netmap|bridge|vhost-user|dump [options]",
.help = "add host VLAN client", .help = "add host VLAN client",
.mhandler.cmd = net_host_device_add, .mhandler.cmd = hmp_host_net_add,
.command_completion = host_net_add_completion, .command_completion = host_net_add_completion,
}, },
@ -1226,7 +1226,7 @@ ETEXI
.args_type = "vlan_id:i,device:s", .args_type = "vlan_id:i,device:s",
.params = "vlan_id name", .params = "vlan_id name",
.help = "remove host VLAN client", .help = "remove host VLAN client",
.mhandler.cmd = net_host_device_remove, .mhandler.cmd = hmp_host_net_remove,
.command_completion = host_net_remove_completion, .command_completion = host_net_remove_completion,
}, },
@ -1302,7 +1302,7 @@ ETEXI
.args_type = "arg1:s,arg2:s?,arg3:s?", .args_type = "arg1:s,arg2:s?,arg3:s?",
.params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport", .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport",
.help = "redirect TCP or UDP connections from host to guest (requires -net user)", .help = "redirect TCP or UDP connections from host to guest (requires -net user)",
.mhandler.cmd = net_slirp_hostfwd_add, .mhandler.cmd = hmp_hostfwd_add,
}, },
#endif #endif
STEXI STEXI
@ -1317,7 +1317,7 @@ ETEXI
.args_type = "arg1:s,arg2:s?,arg3:s?", .args_type = "arg1:s,arg2:s?,arg3:s?",
.params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport", .params = "[vlan_id name] [tcp|udp]:[hostaddr]:hostport",
.help = "remove host-to-guest TCP or UDP redirection", .help = "remove host-to-guest TCP or UDP redirection",
.mhandler.cmd = net_slirp_hostfwd_remove, .mhandler.cmd = hmp_hostfwd_remove,
}, },
#endif #endif
@ -1361,7 +1361,7 @@ ETEXI
.args_type = "action:s", .args_type = "action:s",
.params = "[reset|shutdown|poweroff|pause|debug|none]", .params = "[reset|shutdown|poweroff|pause|debug|none]",
.help = "change watchdog action", .help = "change watchdog action",
.mhandler.cmd = do_watchdog_action, .mhandler.cmd = hmp_watchdog_action,
.command_completion = watchdog_action_completion, .command_completion = watchdog_action_completion,
}, },
@ -1376,7 +1376,7 @@ ETEXI
.args_type = "aclname:s", .args_type = "aclname:s",
.params = "aclname", .params = "aclname",
.help = "list rules in the access control list", .help = "list rules in the access control list",
.mhandler.cmd = do_acl_show, .mhandler.cmd = hmp_acl_show,
}, },
STEXI STEXI
@ -1393,7 +1393,7 @@ ETEXI
.args_type = "aclname:s,policy:s", .args_type = "aclname:s,policy:s",
.params = "aclname allow|deny", .params = "aclname allow|deny",
.help = "set default access control list policy", .help = "set default access control list policy",
.mhandler.cmd = do_acl_policy, .mhandler.cmd = hmp_acl_policy,
}, },
STEXI STEXI
@ -1409,7 +1409,7 @@ ETEXI
.args_type = "aclname:s,match:s,policy:s,index:i?", .args_type = "aclname:s,match:s,policy:s,index:i?",
.params = "aclname match allow|deny [index]", .params = "aclname match allow|deny [index]",
.help = "add a match rule to the access control list", .help = "add a match rule to the access control list",
.mhandler.cmd = do_acl_add, .mhandler.cmd = hmp_acl_add,
}, },
STEXI STEXI
@ -1428,7 +1428,7 @@ ETEXI
.args_type = "aclname:s,match:s", .args_type = "aclname:s,match:s",
.params = "aclname match", .params = "aclname match",
.help = "remove a match rule from the access control list", .help = "remove a match rule from the access control list",
.mhandler.cmd = do_acl_remove, .mhandler.cmd = hmp_acl_remove,
}, },
STEXI STEXI
@ -1442,7 +1442,7 @@ ETEXI
.args_type = "aclname:s", .args_type = "aclname:s",
.params = "aclname", .params = "aclname",
.help = "reset the access control list", .help = "reset the access control list",
.mhandler.cmd = do_acl_reset, .mhandler.cmd = hmp_acl_reset,
}, },
STEXI STEXI
@ -1504,7 +1504,7 @@ ETEXI
.args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l", .args_type = "broadcast:-b,cpu_index:i,bank:i,status:l,mcg_status:l,addr:l,misc:l",
.params = "[-b] cpu bank status mcgstatus addr misc", .params = "[-b] cpu bank status mcgstatus addr misc",
.help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]", .help = "inject a MCE on the given CPU [and broadcast to other CPUs with -b option]",
.mhandler.cmd = do_inject_mce, .mhandler.cmd = hmp_mce,
}, },
#endif #endif
@ -1694,7 +1694,7 @@ ETEXI
.args_type = "item:s?", .args_type = "item:s?",
.params = "[subcommand]", .params = "[subcommand]",
.help = "show various information about the system state", .help = "show various information about the system state",
.mhandler.cmd = do_info_help, .mhandler.cmd = hmp_info_help,
.sub_table = info_cmds, .sub_table = info_cmds,
}, },

6
hmp.c
View file

@ -923,7 +923,7 @@ void hmp_system_wakeup(Monitor *mon, const QDict *qdict)
qmp_system_wakeup(NULL); qmp_system_wakeup(NULL);
} }
void hmp_inject_nmi(Monitor *mon, const QDict *qdict) void hmp_nmi(Monitor *mon, const QDict *qdict)
{ {
Error *err = NULL; Error *err = NULL;
@ -1532,7 +1532,7 @@ void hmp_closefd(Monitor *mon, const QDict *qdict)
hmp_handle_error(mon, &err); hmp_handle_error(mon, &err);
} }
void hmp_send_key(Monitor *mon, const QDict *qdict) void hmp_sendkey(Monitor *mon, const QDict *qdict)
{ {
const char *keys = qdict_get_str(qdict, "keys"); const char *keys = qdict_get_str(qdict, "keys");
KeyValueList *keylist, *head = NULL, *tmp = NULL; KeyValueList *keylist, *head = NULL, *tmp = NULL;
@ -1601,7 +1601,7 @@ err_out:
goto out; goto out;
} }
void hmp_screen_dump(Monitor *mon, const QDict *qdict) void hmp_screendump(Monitor *mon, const QDict *qdict)
{ {
const char *filename = qdict_get_str(qdict, "filename"); const char *filename = qdict_get_str(qdict, "filename");
Error *err = NULL; Error *err = NULL;

6
hmp.h
View file

@ -49,7 +49,7 @@ void hmp_ringbuf_write(Monitor *mon, const QDict *qdict);
void hmp_ringbuf_read(Monitor *mon, const QDict *qdict); void hmp_ringbuf_read(Monitor *mon, const QDict *qdict);
void hmp_cont(Monitor *mon, const QDict *qdict); void hmp_cont(Monitor *mon, const QDict *qdict);
void hmp_system_wakeup(Monitor *mon, const QDict *qdict); void hmp_system_wakeup(Monitor *mon, const QDict *qdict);
void hmp_inject_nmi(Monitor *mon, const QDict *qdict); void hmp_nmi(Monitor *mon, const QDict *qdict);
void hmp_set_link(Monitor *mon, const QDict *qdict); void hmp_set_link(Monitor *mon, const QDict *qdict);
void hmp_block_passwd(Monitor *mon, const QDict *qdict); void hmp_block_passwd(Monitor *mon, const QDict *qdict);
void hmp_balloon(Monitor *mon, const QDict *qdict); void hmp_balloon(Monitor *mon, const QDict *qdict);
@ -82,8 +82,8 @@ void hmp_netdev_add(Monitor *mon, const QDict *qdict);
void hmp_netdev_del(Monitor *mon, const QDict *qdict); void hmp_netdev_del(Monitor *mon, const QDict *qdict);
void hmp_getfd(Monitor *mon, const QDict *qdict); void hmp_getfd(Monitor *mon, const QDict *qdict);
void hmp_closefd(Monitor *mon, const QDict *qdict); void hmp_closefd(Monitor *mon, const QDict *qdict);
void hmp_send_key(Monitor *mon, const QDict *qdict); void hmp_sendkey(Monitor *mon, const QDict *qdict);
void hmp_screen_dump(Monitor *mon, const QDict *qdict); void hmp_screendump(Monitor *mon, const QDict *qdict);
void hmp_nbd_server_start(Monitor *mon, const QDict *qdict); void hmp_nbd_server_start(Monitor *mon, const QDict *qdict);
void hmp_nbd_server_add(Monitor *mon, const QDict *qdict); void hmp_nbd_server_add(Monitor *mon, const QDict *qdict);
void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict); void hmp_nbd_server_stop(Monitor *mon, const QDict *qdict);

View file

@ -267,7 +267,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
return dev; return dev;
} }
void pci_device_hot_add(Monitor *mon, const QDict *qdict) void hmp_pci_add(Monitor *mon, const QDict *qdict)
{ {
PCIDevice *dev = NULL; PCIDevice *dev = NULL;
const char *pci_addr = qdict_get_str(qdict, "pci_addr"); const char *pci_addr = qdict_get_str(qdict, "pci_addr");
@ -337,7 +337,7 @@ static int pci_device_hot_remove(Monitor *mon, const char *pci_addr)
return 0; return 0;
} }
void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict) void hmp_pci_del(Monitor *mon, const QDict *qdict)
{ {
pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr")); pci_device_hot_remove(mon, qdict_get_str(qdict, "pci_addr"));
} }

View file

@ -34,7 +34,7 @@ static void pci_error_message(Monitor *mon)
monitor_printf(mon, "PCI devices not supported\n"); monitor_printf(mon, "PCI devices not supported\n");
} }
int do_pcie_aer_inject_error(Monitor *mon, int hmp_pcie_aer_inject_error(Monitor *mon,
const QDict *qdict, QObject **ret_data) const QDict *qdict, QObject **ret_data)
{ {
pci_error_message(mon); pci_error_message(mon);

View file

@ -962,7 +962,7 @@ static int pcie_aer_parse_error_string(const char *error_name,
return -EINVAL; return -EINVAL;
} }
int do_pcie_aer_inject_error(Monitor *mon, int hmp_pcie_aer_inject_error(Monitor *mon,
const QDict *qdict, QObject **ret_data) const QDict *qdict, QObject **ret_data)
{ {
const char *id = qdict_get_str(qdict, "id"); const char *id = qdict_get_str(qdict, "id");

View file

@ -187,8 +187,8 @@ int net_client_parse(QemuOptsList *opts_list, const char *str);
int net_init_clients(void); int net_init_clients(void);
void net_check_clients(void); void net_check_clients(void);
void net_cleanup(void); void net_cleanup(void);
void net_host_device_add(Monitor *mon, const QDict *qdict); void hmp_host_net_add(Monitor *mon, const QDict *qdict);
void net_host_device_remove(Monitor *mon, const QDict *qdict); void hmp_host_net_remove(Monitor *mon, const QDict *qdict);
void netdev_add(QemuOpts *opts, Error **errp); void netdev_add(QemuOpts *opts, Error **errp);
int qmp_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret); int qmp_netdev_add(Monitor *mon, const QDict *qdict, QObject **ret);

View file

@ -31,8 +31,8 @@
#ifdef CONFIG_SLIRP #ifdef CONFIG_SLIRP
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict); void hmp_hostfwd_add(Monitor *mon, const QDict *qdict);
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict); void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict);
int net_slirp_redir(const char *redir_str); int net_slirp_redir(const char *redir_str);

View file

@ -70,7 +70,7 @@ BlockBackend *blk_next(BlockBackend *blk);
BlockDriverState *blk_bs(BlockBackend *blk); BlockDriverState *blk_bs(BlockBackend *blk);
void blk_hide_on_behalf_of_do_drive_del(BlockBackend *blk); void blk_hide_on_behalf_of_hmp_drive_del(BlockBackend *blk);
void blk_iostatus_enable(BlockBackend *blk); void blk_iostatus_enable(BlockBackend *blk);
int blk_attach_dev(BlockBackend *blk, void *dev); int blk_attach_dev(BlockBackend *blk, void *dev);

View file

@ -67,6 +67,6 @@ DriveInfo *add_init_drive(const char *opts);
void qmp_change_blockdev(const char *device, const char *filename, void qmp_change_blockdev(const char *device, const char *filename,
const char *format, Error **errp); const char *format, Error **errp);
void do_commit(Monitor *mon, const QDict *qdict); void hmp_commit(Monitor *mon, const QDict *qdict);
int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data); int hmp_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);
#endif #endif

View file

@ -74,9 +74,9 @@ void qemu_remove_exit_notifier(Notifier *notify);
void qemu_add_machine_init_done_notifier(Notifier *notify); void qemu_add_machine_init_done_notifier(Notifier *notify);
void do_savevm(Monitor *mon, const QDict *qdict); void hmp_savevm(Monitor *mon, const QDict *qdict);
int load_vmstate(const char *name); int load_vmstate(const char *name);
void do_delvm(Monitor *mon, const QDict *qdict); void hmp_delvm(Monitor *mon, const QDict *qdict);
void do_info_snapshots(Monitor *mon, const QDict *qdict); void do_info_snapshots(Monitor *mon, const QDict *qdict);
void qemu_announce_self(void); void qemu_announce_self(void);
@ -175,16 +175,16 @@ extern const char *prom_envs[MAX_PROM_ENVS];
extern unsigned int nb_prom_envs; extern unsigned int nb_prom_envs;
/* pci-hotplug */ /* pci-hotplug */
void pci_device_hot_add(Monitor *mon, const QDict *qdict); void hmp_pci_add(Monitor *mon, const QDict *qdict);
int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo); int pci_drive_hot_add(Monitor *mon, const QDict *qdict, DriveInfo *dinfo);
void do_pci_device_hot_remove(Monitor *mon, const QDict *qdict); void hmp_pci_del(Monitor *mon, const QDict *qdict);
/* generic hotplug */ /* generic hotplug */
void drive_hot_add(Monitor *mon, const QDict *qdict); void hmp_drive_add(Monitor *mon, const QDict *qdict);
/* pcie aer error injection */ /* pcie aer error injection */
void pcie_aer_inject_error_print(Monitor *mon, const QObject *data); void pcie_aer_inject_error_print(Monitor *mon, const QObject *data);
int do_pcie_aer_inject_error(Monitor *mon, int hmp_pcie_aer_inject_error(Monitor *mon,
const QDict *qdict, QObject **ret_data); const QDict *qdict, QObject **ret_data);
/* serial ports */ /* serial ports */
@ -199,8 +199,8 @@ extern CharDriverState *serial_hds[MAX_SERIAL_PORTS];
extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; extern CharDriverState *parallel_hds[MAX_PARALLEL_PORTS];
void do_usb_add(Monitor *mon, const QDict *qdict); void hmp_usb_add(Monitor *mon, const QDict *qdict);
void do_usb_del(Monitor *mon, const QDict *qdict); void hmp_usb_del(Monitor *mon, const QDict *qdict);
void usb_info(Monitor *mon, const QDict *qdict); void usb_info(Monitor *mon, const QDict *qdict);
void add_boot_device_path(int32_t bootindex, DeviceState *dev, void add_boot_device_path(int32_t bootindex, DeviceState *dev,

View file

@ -56,7 +56,7 @@ struct MouseTransformInfo {
int a[7]; int a[7];
}; };
void do_mouse_set(Monitor *mon, const QDict *qdict); void hmp_mouse_set(Monitor *mon, const QDict *qdict);
/* keysym is a unicode code except for special keys (see QEMU_KEY_xxx /* keysym is a unicode code except for special keys (see QEMU_KEY_xxx
constants) */ constants) */

View file

@ -881,7 +881,7 @@ static void do_help_cmd(Monitor *mon, const QDict *qdict)
help_cmd(mon, qdict_get_try_str(qdict, "name")); help_cmd(mon, qdict_get_try_str(qdict, "name"));
} }
static void do_trace_event_set_state(Monitor *mon, const QDict *qdict) static void hmp_trace_event(Monitor *mon, const QDict *qdict)
{ {
const char *tp_name = qdict_get_str(qdict, "name"); const char *tp_name = qdict_get_str(qdict, "name");
bool new_state = qdict_get_bool(qdict, "option"); bool new_state = qdict_get_bool(qdict, "option");
@ -895,7 +895,7 @@ static void do_trace_event_set_state(Monitor *mon, const QDict *qdict)
} }
#ifdef CONFIG_TRACE_SIMPLE #ifdef CONFIG_TRACE_SIMPLE
static void do_trace_file(Monitor *mon, const QDict *qdict) static void hmp_trace_file(Monitor *mon, const QDict *qdict)
{ {
const char *op = qdict_get_try_str(qdict, "op"); const char *op = qdict_get_try_str(qdict, "op");
const char *arg = qdict_get_try_str(qdict, "arg"); const char *arg = qdict_get_try_str(qdict, "arg");
@ -958,7 +958,7 @@ static void user_async_cmd_handler(Monitor *mon, const mon_cmd_t *cmd,
} }
} }
static void do_info_help(Monitor *mon, const QDict *qdict) static void hmp_info_help(Monitor *mon, const QDict *qdict)
{ {
help_cmd(mon, "info"); help_cmd(mon, "info");
} }
@ -1122,12 +1122,12 @@ static int client_migrate_info(Monitor *mon, const QDict *qdict,
return -1; return -1;
} }
static void do_logfile(Monitor *mon, const QDict *qdict) static void hmp_logfile(Monitor *mon, const QDict *qdict)
{ {
qemu_set_log_filename(qdict_get_str(qdict, "filename")); qemu_set_log_filename(qdict_get_str(qdict, "filename"));
} }
static void do_log(Monitor *mon, const QDict *qdict) static void hmp_log(Monitor *mon, const QDict *qdict)
{ {
int mask; int mask;
const char *items = qdict_get_str(qdict, "items"); const char *items = qdict_get_str(qdict, "items");
@ -1144,7 +1144,7 @@ static void do_log(Monitor *mon, const QDict *qdict)
qemu_set_log(mask); qemu_set_log(mask);
} }
static void do_singlestep(Monitor *mon, const QDict *qdict) static void hmp_singlestep(Monitor *mon, const QDict *qdict)
{ {
const char *option = qdict_get_try_str(qdict, "option"); const char *option = qdict_get_try_str(qdict, "option");
if (!option || !strcmp(option, "on")) { if (!option || !strcmp(option, "on")) {
@ -1156,7 +1156,7 @@ static void do_singlestep(Monitor *mon, const QDict *qdict)
} }
} }
static void do_gdbserver(Monitor *mon, const QDict *qdict) static void hmp_gdbserver(Monitor *mon, const QDict *qdict)
{ {
const char *device = qdict_get_try_str(qdict, "device"); const char *device = qdict_get_try_str(qdict, "device");
if (!device) if (!device)
@ -1172,7 +1172,7 @@ static void do_gdbserver(Monitor *mon, const QDict *qdict)
} }
} }
static void do_watchdog_action(Monitor *mon, const QDict *qdict) static void hmp_watchdog_action(Monitor *mon, const QDict *qdict)
{ {
const char *action = qdict_get_str(qdict, "action"); const char *action = qdict_get_str(qdict, "action");
if (select_watchdog_action(action) == -1) { if (select_watchdog_action(action) == -1) {
@ -1331,7 +1331,7 @@ static void memory_dump(Monitor *mon, int count, int format, int wsize,
} }
} }
static void do_memory_dump(Monitor *mon, const QDict *qdict) static void hmp_memory_dump(Monitor *mon, const QDict *qdict)
{ {
int count = qdict_get_int(qdict, "count"); int count = qdict_get_int(qdict, "count");
int format = qdict_get_int(qdict, "format"); int format = qdict_get_int(qdict, "format");
@ -1341,7 +1341,7 @@ static void do_memory_dump(Monitor *mon, const QDict *qdict)
memory_dump(mon, count, format, size, addr, 0); memory_dump(mon, count, format, size, addr, 0);
} }
static void do_physical_memory_dump(Monitor *mon, const QDict *qdict) static void hmp_physical_memory_dump(Monitor *mon, const QDict *qdict)
{ {
int count = qdict_get_int(qdict, "count"); int count = qdict_get_int(qdict, "count");
int format = qdict_get_int(qdict, "format"); int format = qdict_get_int(qdict, "format");
@ -1377,7 +1377,7 @@ static void do_print(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "\n"); monitor_printf(mon, "\n");
} }
static void do_sum(Monitor *mon, const QDict *qdict) static void hmp_sum(Monitor *mon, const QDict *qdict)
{ {
uint32_t addr; uint32_t addr;
uint16_t sum; uint16_t sum;
@ -1396,7 +1396,7 @@ static void do_sum(Monitor *mon, const QDict *qdict)
static int mouse_button_state; static int mouse_button_state;
static void do_mouse_move(Monitor *mon, const QDict *qdict) static void hmp_mouse_move(Monitor *mon, const QDict *qdict)
{ {
int dx, dy, dz, button; int dx, dy, dz, button;
const char *dx_str = qdict_get_str(qdict, "dx_str"); const char *dx_str = qdict_get_str(qdict, "dx_str");
@ -1420,7 +1420,7 @@ static void do_mouse_move(Monitor *mon, const QDict *qdict)
qemu_input_event_sync(); qemu_input_event_sync();
} }
static void do_mouse_button(Monitor *mon, const QDict *qdict) static void hmp_mouse_button(Monitor *mon, const QDict *qdict)
{ {
static uint32_t bmap[INPUT_BUTTON_MAX] = { static uint32_t bmap[INPUT_BUTTON_MAX] = {
[INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON, [INPUT_BUTTON_LEFT] = MOUSE_EVENT_LBUTTON,
@ -1437,7 +1437,7 @@ static void do_mouse_button(Monitor *mon, const QDict *qdict)
mouse_button_state = button_state; mouse_button_state = button_state;
} }
static void do_ioport_read(Monitor *mon, const QDict *qdict) static void hmp_ioport_read(Monitor *mon, const QDict *qdict)
{ {
int size = qdict_get_int(qdict, "size"); int size = qdict_get_int(qdict, "size");
int addr = qdict_get_int(qdict, "addr"); int addr = qdict_get_int(qdict, "addr");
@ -1471,7 +1471,7 @@ static void do_ioport_read(Monitor *mon, const QDict *qdict)
suffix, addr, size * 2, val); suffix, addr, size * 2, val);
} }
static void do_ioport_write(Monitor *mon, const QDict *qdict) static void hmp_ioport_write(Monitor *mon, const QDict *qdict)
{ {
int size = qdict_get_int(qdict, "size"); int size = qdict_get_int(qdict, "size");
int addr = qdict_get_int(qdict, "addr"); int addr = qdict_get_int(qdict, "addr");
@ -1493,7 +1493,7 @@ static void do_ioport_write(Monitor *mon, const QDict *qdict)
} }
} }
static void do_boot_set(Monitor *mon, const QDict *qdict) static void hmp_boot_set(Monitor *mon, const QDict *qdict)
{ {
Error *local_err = NULL; Error *local_err = NULL;
const char *bootdevice = qdict_get_str(qdict, "bootdevice"); const char *bootdevice = qdict_get_str(qdict, "bootdevice");
@ -2006,7 +2006,7 @@ static void do_info_capture(Monitor *mon, const QDict *qdict)
} }
} }
static void do_stop_capture(Monitor *mon, const QDict *qdict) static void hmp_stopcapture(Monitor *mon, const QDict *qdict)
{ {
int i; int i;
int n = qdict_get_int(qdict, "n"); int n = qdict_get_int(qdict, "n");
@ -2022,7 +2022,7 @@ static void do_stop_capture(Monitor *mon, const QDict *qdict)
} }
} }
static void do_wav_capture(Monitor *mon, const QDict *qdict) static void hmp_wavcapture(Monitor *mon, const QDict *qdict)
{ {
const char *path = qdict_get_str(qdict, "path"); const char *path = qdict_get_str(qdict, "path");
int has_freq = qdict_haskey(qdict, "freq"); int has_freq = qdict_haskey(qdict, "freq");
@ -2057,7 +2057,7 @@ static qemu_acl *find_acl(Monitor *mon, const char *name)
return acl; return acl;
} }
static void do_acl_show(Monitor *mon, const QDict *qdict) static void hmp_acl_show(Monitor *mon, const QDict *qdict)
{ {
const char *aclname = qdict_get_str(qdict, "aclname"); const char *aclname = qdict_get_str(qdict, "aclname");
qemu_acl *acl = find_acl(mon, aclname); qemu_acl *acl = find_acl(mon, aclname);
@ -2075,7 +2075,7 @@ static void do_acl_show(Monitor *mon, const QDict *qdict)
} }
} }
static void do_acl_reset(Monitor *mon, const QDict *qdict) static void hmp_acl_reset(Monitor *mon, const QDict *qdict)
{ {
const char *aclname = qdict_get_str(qdict, "aclname"); const char *aclname = qdict_get_str(qdict, "aclname");
qemu_acl *acl = find_acl(mon, aclname); qemu_acl *acl = find_acl(mon, aclname);
@ -2086,7 +2086,7 @@ static void do_acl_reset(Monitor *mon, const QDict *qdict)
} }
} }
static void do_acl_policy(Monitor *mon, const QDict *qdict) static void hmp_acl_policy(Monitor *mon, const QDict *qdict)
{ {
const char *aclname = qdict_get_str(qdict, "aclname"); const char *aclname = qdict_get_str(qdict, "aclname");
const char *policy = qdict_get_str(qdict, "policy"); const char *policy = qdict_get_str(qdict, "policy");
@ -2106,7 +2106,7 @@ static void do_acl_policy(Monitor *mon, const QDict *qdict)
} }
} }
static void do_acl_add(Monitor *mon, const QDict *qdict) static void hmp_acl_add(Monitor *mon, const QDict *qdict)
{ {
const char *aclname = qdict_get_str(qdict, "aclname"); const char *aclname = qdict_get_str(qdict, "aclname");
const char *match = qdict_get_str(qdict, "match"); const char *match = qdict_get_str(qdict, "match");
@ -2137,7 +2137,7 @@ static void do_acl_add(Monitor *mon, const QDict *qdict)
} }
} }
static void do_acl_remove(Monitor *mon, const QDict *qdict) static void hmp_acl_remove(Monitor *mon, const QDict *qdict)
{ {
const char *aclname = qdict_get_str(qdict, "aclname"); const char *aclname = qdict_get_str(qdict, "aclname");
const char *match = qdict_get_str(qdict, "match"); const char *match = qdict_get_str(qdict, "match");
@ -2154,7 +2154,7 @@ static void do_acl_remove(Monitor *mon, const QDict *qdict)
} }
#if defined(TARGET_I386) #if defined(TARGET_I386)
static void do_inject_mce(Monitor *mon, const QDict *qdict) static void hmp_mce(Monitor *mon, const QDict *qdict)
{ {
X86CPU *cpu; X86CPU *cpu;
CPUState *cs; CPUState *cs;
@ -2232,7 +2232,7 @@ void qmp_closefd(const char *fdname, Error **errp)
error_set(errp, QERR_FD_NOT_FOUND, fdname); error_set(errp, QERR_FD_NOT_FOUND, fdname);
} }
static void do_loadvm(Monitor *mon, const QDict *qdict) static void hmp_loadvm(Monitor *mon, const QDict *qdict)
{ {
int saved_vm_running = runstate_is_running(); int saved_vm_running = runstate_is_running();
const char *name = qdict_get_str(qdict, "name"); const char *name = qdict_get_str(qdict, "name");

View file

@ -953,7 +953,7 @@ static int net_host_check_device(const char *device)
return 0; return 0;
} }
void net_host_device_add(Monitor *mon, const QDict *qdict) void hmp_host_net_add(Monitor *mon, const QDict *qdict)
{ {
const char *device = qdict_get_str(qdict, "device"); const char *device = qdict_get_str(qdict, "device");
const char *opts_str = qdict_get_try_str(qdict, "opts"); const char *opts_str = qdict_get_try_str(qdict, "opts");
@ -980,7 +980,7 @@ void net_host_device_add(Monitor *mon, const QDict *qdict)
} }
} }
void net_host_device_remove(Monitor *mon, const QDict *qdict) void hmp_host_net_remove(Monitor *mon, const QDict *qdict)
{ {
NetClientState *nc; NetClientState *nc;
int vlan_id = qdict_get_int(qdict, "vlan_id"); int vlan_id = qdict_get_int(qdict, "vlan_id");

View file

@ -299,7 +299,7 @@ static SlirpState *slirp_lookup(Monitor *mon, const char *vlan,
} }
} }
void net_slirp_hostfwd_remove(Monitor *mon, const QDict *qdict) void hmp_hostfwd_remove(Monitor *mon, const QDict *qdict)
{ {
struct in_addr host_addr = { .s_addr = INADDR_ANY }; struct in_addr host_addr = { .s_addr = INADDR_ANY };
int host_port; int host_port;
@ -420,7 +420,7 @@ static int slirp_hostfwd(SlirpState *s, const char *redir_str,
return -1; return -1;
} }
void net_slirp_hostfwd_add(Monitor *mon, const QDict *qdict) void hmp_hostfwd_add(Monitor *mon, const QDict *qdict)
{ {
const char *redir_str; const char *redir_str;
SlirpState *s; SlirpState *s;

View file

@ -1091,7 +1091,7 @@ static int del_existing_snapshots(Monitor *mon, const char *name)
return 0; return 0;
} }
void do_savevm(Monitor *mon, const QDict *qdict) void hmp_savevm(Monitor *mon, const QDict *qdict)
{ {
BlockDriverState *bs, *bs1; BlockDriverState *bs, *bs1;
QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1; QEMUSnapshotInfo sn1, *sn = &sn1, old_sn1, *old_sn = &old_sn1;
@ -1295,7 +1295,7 @@ int load_vmstate(const char *name)
return 0; return 0;
} }
void do_delvm(Monitor *mon, const QDict *qdict) void hmp_delvm(Monitor *mon, const QDict *qdict)
{ {
BlockDriverState *bs; BlockDriverState *bs;
Error *err; Error *err;

View file

@ -526,7 +526,7 @@ MouseInfoList *qmp_query_mice(Error **errp)
return mice_list; return mice_list;
} }
void do_mouse_set(Monitor *mon, const QDict *qdict) void hmp_mouse_set(Monitor *mon, const QDict *qdict)
{ {
QemuInputHandlerState *s; QemuInputHandlerState *s;
int index = qdict_get_int(qdict, "index"); int index = qdict_get_int(qdict, "index");

4
vl.c
View file

@ -1284,7 +1284,7 @@ static int usb_parse(const char *cmdline)
return r; return r;
} }
void do_usb_add(Monitor *mon, const QDict *qdict) void hmp_usb_add(Monitor *mon, const QDict *qdict)
{ {
const char *devname = qdict_get_str(qdict, "devname"); const char *devname = qdict_get_str(qdict, "devname");
if (usb_device_add(devname) < 0) { if (usb_device_add(devname) < 0) {
@ -1292,7 +1292,7 @@ void do_usb_add(Monitor *mon, const QDict *qdict)
} }
} }
void do_usb_del(Monitor *mon, const QDict *qdict) void hmp_usb_del(Monitor *mon, const QDict *qdict)
{ {
const char *devname = qdict_get_str(qdict, "devname"); const char *devname = qdict_get_str(qdict, "devname");
if (usb_device_del(devname) < 0) { if (usb_device_del(devname) < 0) {