OSDN Git Service

memory-device: Unify enabled vs. supported error messages
authorDavid Hildenbrand <david@redhat.com>
Fri, 23 Jun 2023 12:45:44 +0000 (14:45 +0200)
committerDavid Hildenbrand <david@redhat.com>
Wed, 12 Jul 2023 07:25:06 +0000 (09:25 +0200)
commit99d88de6eb577ff70cc1b1ed59f1a50f16038c2e
tree58e08ebad83afe25f85d678861d37c5e9bb0df42
parent887cba855bb6ff4775256f7968409281350b568c
memory-device: Unify enabled vs. supported error messages

Let's unify the error messages, such that we can simply stop allocating
ms->device_memory if the size would be 0 (and there are no memory
devices ever).

The case of "not supported by the machine" should barely pop up either
way: if the machine doesn't support memory devices, it usually doesn't
call the pre_plug handler ...

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20230623124553.400585-2-david@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/mem/memory-device.c