aboutsummaryrefslogtreecommitdiff
path: root/block/raw-win32.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-01-20 18:13:42 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-26 15:42:02 -0600
commit9a2d77ad0dd6b3e93669543b846a75c02878eba7 (patch)
treeb9c5bac76f770d1def9446c3853664197eb6e69f /block/raw-win32.c
parent6987307ca30aead67e8545934186c92f942710f6 (diff)
downloadqemu-9a2d77ad0dd6b3e93669543b846a75c02878eba7.zip
qemu-9a2d77ad0dd6b3e93669543b846a75c02878eba7.tar.gz
qemu-9a2d77ad0dd6b3e93669543b846a75c02878eba7.tar.bz2
block: kill BDRV_O_CREAT
The BDRV_O_CREAT option is unused inside qemu and partially duplicates the bdrv_create method. Remove it, and the -C option to qemu-io which isn't used in qemu-iotests anyway. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block/raw-win32.c')
-rw-r--r--block/raw-win32.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/block/raw-win32.c b/block/raw-win32.c
index 01a6d25..526764f 100644
--- a/block/raw-win32.c
+++ b/block/raw-win32.c
@@ -76,7 +76,7 @@ static int set_sparse(int fd)
static int raw_open(BlockDriverState *bs, const char *filename, int flags)
{
BDRVRawState *s = bs->opaque;
- int access_flags, create_flags;
+ int access_flags;
DWORD overlapped;
s->type = FTYPE_FILE;
@@ -86,11 +86,7 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags)
} else {
access_flags = GENERIC_READ;
}
- if (flags & BDRV_O_CREAT) {
- create_flags = CREATE_ALWAYS;
- } else {
- create_flags = OPEN_EXISTING;
- }
+
overlapped = FILE_ATTRIBUTE_NORMAL;
if ((flags & BDRV_O_NOCACHE))
overlapped |= FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH;
@@ -98,7 +94,7 @@ static int raw_open(BlockDriverState *bs, const char *filename, int flags)
overlapped |= FILE_FLAG_WRITE_THROUGH;
s->hfile = CreateFile(filename, access_flags,
FILE_SHARE_READ, NULL,
- create_flags, overlapped, NULL);
+ OPEN_EXISTING, overlapped, NULL);
if (s->hfile == INVALID_HANDLE_VALUE) {
int err = GetLastError();