]> git.proxmox.com Git - qemu.git/blobdiff - block/vvfat.c
block: return get_block_status data and flags for formats
[qemu.git] / block / vvfat.c
index 2a5bca3fcf1dbe54015bcc44eacfda559295e4b0..0129195e29d9af8ec3c4db90436d60a76bb69d48 100644 (file)
@@ -2879,11 +2879,12 @@ static int64_t coroutine_fn vvfat_co_get_block_status(BlockDriverState *bs,
 {
     BDRVVVFATState* s = bs->opaque;
     *n = s->sector_count - sector_num;
-    if (*n > nb_sectors)
-       *n = nb_sectors;
-    else if (*n < 0)
-       return 0;
-    return 1;
+    if (*n > nb_sectors) {
+        *n = nb_sectors;
+    } else if (*n < 0) {
+        return 0;
+    }
+    return BDRV_BLOCK_DATA;
 }
 
 static int write_target_commit(BlockDriverState *bs, int64_t sector_num,