]> git.proxmox.com Git - mirror_qemu.git/commit - monitor.c
monitor usb: Inline monitor_read_bdrv_key_start()'s first part
authorMarkus Armbruster <armbru@redhat.com>
Thu, 12 Mar 2015 16:26:48 +0000 (17:26 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Mar 2015 13:23:52 +0000 (14:23 +0100)
commit9b14e0efcc9a6ea41b7265538f6ec4c53e2ba270
treed763480ad414d55dd59a53fb274bd2165cb6571a
parent988e0f06621fde11ec0d319a6fd0ab3ccef0602f
monitor usb: Inline monitor_read_bdrv_key_start()'s first part

monitor_read_bdrv_key_start() does several things:

1. If no key is needed, call completion_cb() and succeed

2. If we're in QMP context, call qerror_report_err() and fail

3. Start reading the key in the monitor.

This is two things too many.  Inline 1. and 2. into its callers
monitor_read_block_device_key() and usb_msd_realize_storage().

Since monitor_read_block_device_key() only ever runs in HMP context,
drop 2. there.

The next commit will clean up the result in usb_msd_realize_storage().

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-storage.c
monitor.c