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-posix.c | |
parent | 3e98dc8ec6af89c7f4f1e006b979eb405b431629 (diff) | |
download | qemu-33f002714be2ed58ed05ae3870d5ea6915df4b47.tar.gz qemu-33f002714be2ed58ed05ae3870d5ea6915df4b47.tar.bz2 qemu-33f002714be2ed58ed05ae3870d5ea6915df4b47.zip |
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-posix.c')
-rw-r--r-- | block-raw-posix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block-raw-posix.c b/block-raw-posix.c index 089a1f4a99..8ace5ef746 100644 --- a/block-raw-posix.c +++ b/block-raw-posix.c @@ -106,6 +106,10 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags) } if (flags & BDRV_O_CREAT) open_flags |= O_CREAT | O_TRUNC; +#ifdef O_DIRECT + if (flags & BDRV_O_DIRECT) + open_flags |= O_DIRECT; +#endif s->type = FTYPE_FILE; @@ -659,6 +663,10 @@ static int hdev_open(BlockDriverState *bs, const char *filename, int flags) open_flags |= O_RDONLY; bs->read_only = 1; } +#ifdef O_DIRECT + if (flags & BDRV_O_DIRECT) + open_flags |= O_DIRECT; +#endif s->type = FTYPE_FILE; #if defined(__linux__) |