Patchwork [3/3] Drop default SD card creation

login
register
mail settings
Submitter Peter Maydell
Date Aug. 16, 2012, 1:45 p.m.
Message ID <1345124754-4173-4-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/177993/
State New
Headers show

Comments

Peter Maydell - Aug. 16, 2012, 1:45 p.m.
Now that all users of IF_SD drives can cope with there being
no drive present (ie "controller exists but there is no card in it")
we can drop the creation of the default IF_SD card in vl.c and
the no_sdcard field in the QEMUMachine struct.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/boards.h      |    3 +--
 hw/s390-virtio.c |    1 -
 hw/xilinx_zynq.c |    1 -
 vl.c             |    7 -------
 4 files changed, 1 insertion(+), 11 deletions(-)

Patch

diff --git a/hw/boards.h b/hw/boards.h
index 59c01d0..af4c019 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -23,8 +23,7 @@  typedef struct QEMUMachine {
         no_parallel:1,
         use_virtcon:1,
         no_floppy:1,
-        no_cdrom:1,
-        no_sdcard:1;
+        no_cdrom:1;
     int is_default;
     const char *default_machine_opts;
     GlobalProperty *compat_props;
diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c
index 47eed35..560393f 100644
--- a/hw/s390-virtio.c
+++ b/hw/s390-virtio.c
@@ -338,7 +338,6 @@  static QEMUMachine s390_machine = {
     .no_floppy = 1,
     .no_serial = 1,
     .no_parallel = 1,
-    .no_sdcard = 1,
     .use_virtcon = 1,
     .max_cpus = 255,
     .is_default = 1,
diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c
index 7e6c273..b532953 100644
--- a/hw/xilinx_zynq.c
+++ b/hw/xilinx_zynq.c
@@ -146,7 +146,6 @@  static QEMUMachine zynq_machine = {
     .init = zynq_init,
     .use_scsi = 1,
     .max_cpus = 1,
-    .no_sdcard = 1
 };
 
 static void zynq_machine_init(void)
diff --git a/vl.c b/vl.c
index d01256a..ba1953c 100644
--- a/vl.c
+++ b/vl.c
@@ -268,7 +268,6 @@  static int default_virtcon = 1;
 static int default_monitor = 1;
 static int default_floppy = 1;
 static int default_cdrom = 1;
-static int default_sdcard = 1;
 static int default_vga = 1;
 
 static struct {
@@ -3169,7 +3168,6 @@  int main(int argc, char **argv, char **envp)
                 default_net = 0;
                 default_floppy = 0;
                 default_cdrom = 0;
-                default_sdcard = 0;
                 default_vga = 0;
                 break;
             case QEMU_OPTION_xen_domid:
@@ -3343,9 +3341,6 @@  int main(int argc, char **argv, char **envp)
     if (machine->no_cdrom) {
         default_cdrom = 0;
     }
-    if (machine->no_sdcard) {
-        default_sdcard = 0;
-    }
 
     if (display_type == DT_NOGRAPHIC) {
         if (default_parallel)
@@ -3488,8 +3483,6 @@  int main(int argc, char **argv, char **envp)
                   IF_DEFAULT, 2, CDROM_OPTS);
     default_drive(default_floppy, snapshot, machine->use_scsi,
                   IF_FLOPPY, 0, FD_OPTS);
-    default_drive(default_sdcard, snapshot, machine->use_scsi,
-                  IF_SD, 0, SD_OPTS);
 
     register_savevm_live(NULL, "ram", 0, 4, &savevm_ram_handlers, NULL);