]> xenbits.xensource.com Git - qemu-xen-3.4-testing.git/commitdiff
Disable buffer cache invalidation on non-linux hosts
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 14 Jan 2009 16:26:38 +0000 (16:26 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 14 Jan 2009 16:26:38 +0000 (16:26 +0000)
The BLKFLSBUF ioctl is Linux-specific.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
block-raw-posix.c

index f705c51cfadb3f1c5d2696036d802d9cb439db24..0237039a6ba70a7b230bbc3063b528a6bfeed9f1 100644 (file)
@@ -793,7 +793,7 @@ static void raw_close(BlockDriverState *bs)
 {
     BDRVRawState *s = bs->opaque;
     if (s->fd >= 0) {
-#ifndef CONFIG_STUBDOM
+#if defined(__linux__) && !defined(CONFIG_STUBDOM)
         /* Invalidate buffer cache for this device. */
         ioctl(s->fd, BLKFLSBUF, 0);
 #endif