Skip to contentSkip to conversation

raw-win32: Fix bdrv_flush return value

PATCH In review Kevin Wolf 2 participants 2 messages Jan 28, 2011 – Jan 29, 2011 Block layer

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 raw-win32: Fix bdrv_flush return value

---

Hi TeLeMan,

this seems to be the bug that was exposed by the recent qcow2 cache changes. Can you give it a try on a real Windows setup? I have tested it only on Wine so far.

Kevin

 block/raw-win32.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
block/raw-win32.c +1 -1
index 06c9710..c204a80 100644
@@ -153,7 +153,7 @@ static int raw_flush(BlockDriverState *bs)
     int ret;
 
     ret = FlushFileBuffers(s->hfile);
-    if (ret != 0) {
+    if (ret == 0) {
         return -EIO;
     }
 
Signature · 1 line
1.7.2.3
#1 lore raw

Thanks, It works very well on win7 and winxp.
--
SUN OF A BEACH

Quoted 33 lines · Kevin Wolf

---

Hi TeLeMan,

this seems to be the bug that was exposed by the recent qcow2 cache changes. Can you give it a try on a real Windows setup? I have tested it only on Wine so far.

Kevin

 block/raw-win32.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
block/raw-win32.c +1 -2
index 06c9710..c204a80 100644
@@ -153,7 +153,7 @@ static int raw_flush(BlockDriverState *bs)
     int ret;
 
     ret = FlushFileBuffers(s->hfile);
-    if (ret != 0) {
+    if (ret == 0) {
         return -EIO;
     }
 
--

1.7.2.3