On 25/11/2024 19.14, Philippe Mathieu-Daudé wrote:
Invert the 'no_sdcard' logic, renaming it as the more
explicit "create_default_sdcard_drive". Machines are
supposed to create a SD Card drive when this flag is
set. In many cases it doesn't make much sense (as
boards don't expose SD Card host controller),
This indeed shows the insanity of the previous state, thanks for
tackling it!
but this
is patch only aims to expose that nonsense; so no
logical change intended (mechanical patch using gsed).
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
...
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 86fcf9c81f..5cec73ae68 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -285,7 +285,7 @@ struct MachineClass {
no_cdrom:1,
pci_allow_0_address:1,
legacy_fw_cfg_order:1;
- OnOffAuto no_sdcard;
+ bool create_default_sdcard_drive;
Can we maybe still bikeshed about the naming here? The current name is a
little bit long, and maybe we could "standardize" the prefix of the
flags here a little bit. We already have one switch starting with
"has_..." and some others starting with "auto_enable_...", so I'd maybe
suggest one of those instead:
has_default_sdcard
auto_enable_sdcard