From 2ffb6fdfd3bda48641c6e4dfcab8dce88409369d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 14 Jan 2009 16:26:38 +0000 Subject: [PATCH] Disable buffer cache invalidation on non-linux hosts The BLKFLSBUF ioctl is Linux-specific. Signed-off-by: Christoph Egger --- block-raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-raw-posix.c b/block-raw-posix.c index f705c51cf..0237039a6 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -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 -- 2.39.5