]> Git Repo - qemu.git/blobdiff - qemu-io-cmds.c
Merge remote-tracking branch 'sstabellini/xen-2013-09-25' into staging
[qemu.git] / qemu-io-cmds.c
index ffbcf31cfc6389e7b615bfc9529dc3e9629220f8..8565d49336ac713f26bc959f1fd6718a704bbe2f 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "qemu-io.h"
 #include "block/block_int.h"
+#include "qemu/main-loop.h"
 
 #define CMD_NOFILE_OK   0x01
 
@@ -1829,6 +1830,10 @@ static int alloc_f(BlockDriverState *bs, int argc, char **argv)
     sector_num = offset >> 9;
     while (remaining) {
         ret = bdrv_is_allocated(bs, sector_num, remaining, &num);
+        if (ret < 0) {
+            printf("is_allocated failed: %s\n", strerror(-ret));
+            return 0;
+        }
         sector_num += num;
         remaining -= num;
         if (ret) {
This page took 0.021965 seconds and 4 git commands to generate.