aboutsummaryrefslogtreecommitdiff
path: root/block/file-win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/file-win32.c')
-rw-r--r--block/file-win32.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/file-win32.c b/block/file-win32.c
index b28603c7d5..2642088bd6 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -596,11 +596,9 @@ static int raw_co_create(BlockdevCreateOptions *options, Error **errp)
return -EINVAL;
}
- fd = qemu_open_old(file_opts->filename,
- O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
- 0644);
+ fd = qemu_create(file_opts->filename, O_WRONLY | O_TRUNC | O_BINARY,
+ 0644, errp);
if (fd < 0) {
- error_setg_errno(errp, errno, "Could not create file");
return -EIO;
}
set_sparse(fd);