mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
hw/boards: Rename no_sdcard -> auto_create_sdcard
Invert the 'no_sdcard' logic, renaming it as the more explicit "auto_create_sdcard". 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), but this is patch only aims to expose that nonsense; so no logical change intended (mechanical patch using gsed). Most of the changes are: - mc->no_sdcard = ON_OFF_AUTO_OFF; + mc->auto_create_sdcard = true; Except in . hw/core/null-machine.c . hw/arm/xilinx_zynq.c . hw/s390x/s390-virtio-ccw.c where the disabled option is manually removed (since default): - mc->no_sdcard = ON_OFF_AUTO_ON; + mc->auto_create_sdcard = false; - mc->auto_create_sdcard = false; and in system/vl.c we change the 'default_sdcard' type to boolean. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20250204200934.65279-4-philmd@linaro.org>
This commit is contained in:
+4
-5
@@ -194,7 +194,7 @@ static int default_parallel = 1;
|
||||
static int default_monitor = 1;
|
||||
static int default_floppy = 1;
|
||||
static int default_cdrom = 1;
|
||||
static int default_sdcard = 1;
|
||||
static bool auto_create_sdcard = true;
|
||||
static int default_vga = 1;
|
||||
static int default_net = 1;
|
||||
|
||||
@@ -718,7 +718,7 @@ static void configure_blockdev(BlockdevOptionsQueue *bdo_queue,
|
||||
default_drive(default_cdrom, snapshot, machine_class->block_default_type, 2,
|
||||
CDROM_OPTS);
|
||||
default_drive(default_floppy, snapshot, IF_FLOPPY, 0, FD_OPTS);
|
||||
default_drive(default_sdcard, snapshot, IF_SD, 0, SD_OPTS);
|
||||
default_drive(auto_create_sdcard, snapshot, IF_SD, 0, SD_OPTS);
|
||||
|
||||
}
|
||||
|
||||
@@ -1346,9 +1346,8 @@ static void qemu_disable_default_devices(void)
|
||||
if (!has_defaults || machine_class->no_cdrom) {
|
||||
default_cdrom = 0;
|
||||
}
|
||||
assert(machine_class->no_sdcard != ON_OFF_AUTO_AUTO);
|
||||
if (!has_defaults || machine_class->no_sdcard == ON_OFF_AUTO_ON) {
|
||||
default_sdcard = 0;
|
||||
if (!has_defaults || !machine_class->auto_create_sdcard) {
|
||||
auto_create_sdcard = false;
|
||||
}
|
||||
if (!has_defaults) {
|
||||
default_audio = 0;
|
||||
|
||||
Reference in New Issue
Block a user