summaryrefslogtreecommitdiff
path: root/block/raw-posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r--block/raw-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 414e6d1e91..e0e48c5f51 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -1451,7 +1451,7 @@ static int raw_create(const char *filename, QemuOpts *opts, Error **errp)
"Could not write to the new file");
break;
}
- left -= num;
+ left -= result;
}
fsync(fd);
g_free(buf);