qemu-e2k/stubs
Kevin Wolf 8e9119a807 hmp: Fail gracefully if chardev is already in use
Trying to attach a HMP monitor to a chardev that is already in use
results in a crash because monitor_init_hmp() passes &error_abort to
qemu_chr_fe_init():

$ ./x86_64-softmmu/qemu-system-x86_64 --chardev stdio,id=foo --mon foo --mon foo
QEMU 4.2.50 monitor - type 'help' for more information
(qemu) Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:220:
qemu-system-x86_64: --mon foo: Device 'foo' is in use
Abgebrochen (Speicherabzug geschrieben)

Fix this by allowing monitor_init_hmp() to return an error and passing
any error in qemu_chr_fe_init() to its caller instead of aborting.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200224143008.13362-19-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-03-06 17:21:28 +01:00
..
arch_type.c stubs: Add arch_type 2020-03-06 17:15:38 +01:00
bdrv-next-monitor-owned.c
blk-commit-all.c
blockdev-close-all-bdrv-states.c
change-state-handler.c
clock-warp.c
cpu-get-clock.c
cpu-get-icount.c
dump.c
error-printf.c
fd-register.c
fdset.c
fw_cfg.c
gdbstub.c
get-vm-name.c
io_uring.c stubs: add stubs for io_uring interface 2020-01-30 20:59:41 +00:00
iothread-lock.c
iothread.c
is-daemonized.c
linux-aio.c
machine-init-done.c
Makefile.objs stubs: Update monitor stubs for qemu-storage-daemon 2020-03-06 17:21:28 +01:00
migr-blocker.c
monitor-core.c qmp: Fail gracefully if chardev is already in use 2020-03-06 17:21:28 +01:00
monitor.c hmp: Fail gracefully if chardev is already in use 2020-03-06 17:21:28 +01:00
notify-event.c
pci-host-piix.c hw/pci-host/piix: Move i440FX declarations to hw/pci-host/i440fx.h 2019-11-05 23:33:12 +01:00
qmp_memory_device.c
qtest.c
ram-block.c
ramfb.c
replay-user.c
replay.c replay: record and replay random number sources 2020-01-07 12:08:39 +01:00
runstate-check.c
semihost.c semihosting: add qemu_semihosting_console_inc for SYS_READC 2020-01-09 11:41:29 +00:00
set-fd-handler.c
sysbus.c
target-get-monitor-def.c
target-monitor-defs.c
tpm.c
trace-control.c
uuid.c
vm-stop.c
vmgenid.c
vmstate.c migration: Change SaveStateEntry.instance_id into uint32_t 2020-01-20 09:10:23 +01:00
xen-common.c
xen-hvm.c