]> xenbits.xensource.com Git - xen.git/commitdiff
ioemu: advertise write cache as enabled only when it actually is.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Apr 2008 14:30:26 +0000 (15:30 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 2 Apr 2008 14:30:26 +0000 (15:30 +0100)
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
tools/ioemu/hw/ide.c

index cfe3e8a5b240c1e9cebc5be63d761c1a7c1f3f35..c8df301b39dc0eb4a2d162e5a069cc8eba230d88 100644 (file)
@@ -660,7 +660,7 @@ static void ide_identify(IDEState *s)
     put_le16(p + 83, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     put_le16(p + 84, (1 << 14));
     /* 14=nop 5=write_cache */
-    put_le16(p + 85, (1 << 14) | (1 << 5));
+    put_le16(p + 85, (1 << 14) | (s->write_cache << 5));
     /* 13=flush_cache_ext,12=flush_cache,10=lba48 */
     put_le16(p + 86, (1 << 14) | (1 << 13) | (1 <<12) | (1 << 10));
     put_le16(p + 87, (1 << 14));