]> git.proxmox.com Git - mirror_qemu.git/commit
machine: Improve error message when using default RAM backend id
authorDavid Hildenbrand <david@redhat.com>
Wed, 6 Sep 2023 12:05:03 +0000 (14:05 +0200)
committerDavid Hildenbrand <david@redhat.com>
Tue, 19 Sep 2023 08:44:36 +0000 (10:44 +0200)
commit41ddcd2308f76cc95459c2961f4a50b66a70d3c4
treeb562a9e263d560cb4a4ae9e0b0346dd27ff16887
parent6da4b1c25d89cc8e8d1be40b96602d08a3e88e0c
machine: Improve error message when using default RAM backend id

For migration purposes, users might want to reuse the default RAM
backend id, but specify a different memory backend.

For example, to reuse "pc.ram" on q35, one has to set
    -machine q35,memory-backend=pc.ram
Only then, can a memory backend with the id "pc.ram" be created
manually.

Let's improve the error message by improving the hint. Use
error_append_hint() -- which in turn requires ERRP_GUARD().

Message-ID: <20230906120503.359863-12-david@redhat.com>
Suggested-by: ThinerLogoer <logoerthiner1@163.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Mario Casquero <mcasquer@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/core/machine.c