diff options
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2242,7 +2242,7 @@ static int drive_init(struct drive_opt *arg, int snapshot, unit_id = -1; translation = BIOS_ATA_TRANSLATION_AUTO; index = -1; - cache = 1; + cache = 3; if (machine->use_scsi) { type = IF_SCSI; @@ -2517,6 +2517,8 @@ static int drive_init(struct drive_opt *arg, int snapshot, bdrv_flags |= BDRV_O_NOCACHE; else if (cache == 2) /* write-back */ bdrv_flags |= BDRV_O_CACHE_WB; + else if (cache == 3) /* not specified */ + bdrv_flags |= BDRV_O_CACHE_DEF; if (bdrv_open2(bdrv, file, bdrv_flags, drv) < 0 || qemu_key_check(bdrv, file)) { fprintf(stderr, "qemu: could not open disk image %s\n", file); |