From a391eeb129de8b0a9cb9fac4d3fbe5bd3a3cc6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 20 Jun 2024 17:57:39 +0100 Subject: hw: skip registration of outdated versioned machine types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This calls the MACHINE_VER_DELETION() macro in the machine type registration method, so that when a versioned machine type reaches the end of its life, it is no longer registered with QOM and thus cannot be used. The actual definition of the machine type should be deleted at this point, but experience shows that can easily be forgotten. By skipping registration the manual code deletion task can be done at any later date. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240620165742.1711389-12-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 83d2e66..4e55d7e 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -340,6 +340,7 @@ extern const size_t pc_compat_2_3_len; }; \ static void MACHINE_VER_SYM(register, namesym, __VA_ARGS__)(void) \ { \ + MACHINE_VER_DELETION(__VA_ARGS__); \ type_register(&MACHINE_VER_SYM(info, namesym, __VA_ARGS__)); \ } \ type_init(MACHINE_VER_SYM(register, namesym, __VA_ARGS__)); -- cgit v1.1