qemu-e2k/hw/core
Peter Maydell 62f7dbde4c qdev-properties-system: Improve error message for drive assignment conflict
If the user forgot if=none on their drive specification they're likely
to get an error message because the drive is assigned once automatically
by QEMU and once by the manual id=/drive= user command line specification.
Improve the error message produced in this case to explicitly guide the
user towards if=none.

We rephrase the "drive conflict but not for an if=something" error as
well to keep the wording in line.

The two cases that change are:

(1) Drive specified as to be auto-connected and also manually connected
(and the board does handle this if= type):

  qemu-system-x86_64 -nodefaults -display none \
     -drive if=scsi,file=tmp.qcow2,id=foo -device ide-hd,drive=foo

Previously:
  qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
  can't take value 'foo', it's in use

Now:
  qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
  use because it has been automatically connected to another device (did
  you need 'if=none' in the drive options?)

(2) Drive specified to be manually connected in two different ways:

  qemu-system-x86_64 -nodefaults -display none \
   -drive if=none,file=tmp.qcow2,id=foo -device ide-hd,drive=foo \
   -device ide-hd,drive=foo

Previously:
  qemu-system-x86_64: -device ide-hd,drive=foo: Property 'ide-hd.drive'
  can't take value 'foo', it's in use

Now:
  qemu-system-x86_64: -device ide-hd,drive=foo: Drive 'foo' is already in
  use by another device

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 1435068107-12594-3-git-send-email-peter.maydell@linaro.org
2015-06-26 14:22:36 +01:00
..
empty_slot.c empty_slot: QOM cast cleanup 2013-07-29 21:06:37 +02:00
fw-path-provider.c fw_cfg: fix typos in comments: patch -> path 2015-02-10 09:27:19 +03:00
hotplug.c qdev: HotplugHandler: Provide unplug callback 2014-10-15 05:03:13 +02:00
irq.c irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader.c acpi-build: remove dependency from ram_addr.h 2015-04-27 18:24:18 +02:00
machine.c machine: add default_ram_size to machine class 2015-06-03 23:56:55 +02:00
Makefile.objs Create specific config option for "platform-bus" 2015-02-27 15:17:42 +01:00
nmi.c qerror: Clean up QERR_ macros to expand into a single string 2015-06-22 18:20:40 +02:00
null-machine.c machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
platform-bus.c Include monitor/monitor.h exactly where needed 2015-06-22 18:20:41 +02:00
ptimer.c hw/ptimer: Do not artificially limit timers when using icount 2015-05-08 17:15:23 +10:00
qdev-properties-system.c qdev-properties-system: Improve error message for drive assignment conflict 2015-06-26 14:22:36 +01:00
qdev-properties.c qerror: Move #include out of qerror.h 2015-06-22 18:20:40 +02:00
qdev.c qerror: Move #include out of qerror.h 2015-06-22 18:20:40 +02:00
stream.c
sysbus.c hw/core: rebase sysbus_get_fw_dev_path() to g_strdup_printf() 2015-06-19 12:17:49 +02:00
uboot_image.h