diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-24 14:33:24 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-12-24 14:33:24 +0000 |
commit | 33f002714be2ed58ed05ae3870d5ea6915df4b47 (patch) | |
tree | 6b5f907e0c0b42bc6ca4222f1e14462be5e30c1a /block-raw-win32.c | |
parent | 3e98dc8ec6af89c7f4f1e006b979eb405b431629 (diff) |
Add "cache" parameter to "-drive" (Laurent Vivier).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3848 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-raw-win32.c')
-rw-r--r-- | block-raw-win32.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block-raw-win32.c b/block-raw-win32.c index db9995c046..43d3f6c4c2 100644 --- a/block-raw-win32.c +++ b/block-raw-win32.c @@ -105,6 +105,8 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags) #else overlapped = FILE_FLAG_OVERLAPPED; #endif + if (flags & BDRV_O_DIRECT) + overlapped |= FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH; s->hfile = CreateFile(filename, access_flags, FILE_SHARE_READ, NULL, create_flags, overlapped, NULL); @@ -473,6 +475,8 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags) #else overlapped = FILE_FLAG_OVERLAPPED; #endif + if (flags & BDRV_O_DIRECT) + overlapped |= FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH; s->hfile = CreateFile(filename, access_flags, FILE_SHARE_READ, NULL, create_flags, overlapped, NULL); |