]> Git Repo - qemu.git/blobdiff - qemu-img.c
profiler: Reenable built-in profiler
[qemu.git] / qemu-img.c
index 7ac7f56c5d5f8eac590e16b48933535841fdc048..9dddfbefce6bb79c1d00ec5e4064c9cbcf496b9c 100644 (file)
@@ -274,8 +274,7 @@ static int print_block_option_help(const char *filename, const char *fmt)
     if (filename) {
         proto_drv = bdrv_find_protocol(filename, true, &local_err);
         if (!proto_drv) {
-            qerror_report_err(local_err);
-            error_free(local_err);
+            error_report_err(local_err);
             qemu_opts_free(create_opts);
             return 1;
         }
@@ -976,7 +975,8 @@ static int is_allocated_sectors_min(const uint8_t *buf, int n, int *pnum,
 static int compare_sectors(const uint8_t *buf1, const uint8_t *buf2, int n,
     int *pnum)
 {
-    int res, i;
+    bool res;
+    int i;
 
     if (n <= 0) {
         *pnum = 0;
@@ -1525,8 +1525,7 @@ static int img_convert(int argc, char **argv)
 
     proto_drv = bdrv_find_protocol(out_filename, true, &local_err);
     if (!proto_drv) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+        error_report_err(local_err);
         ret = -1;
         goto out;
     }
@@ -1553,8 +1552,7 @@ static int img_convert(int argc, char **argv)
         if (options) {
             qemu_opts_do_parse(opts, options, NULL, &local_err);
             if (local_err) {
-                error_report("Invalid options for file format '%s'", out_fmt);
-                error_free(local_err);
+                error_report_err(local_err);
                 ret = -1;
                 goto out;
             }
@@ -1645,7 +1643,7 @@ static int img_convert(int argc, char **argv)
     if (skip_create) {
         int64_t output_sectors = blk_nb_sectors(out_blk);
         if (output_sectors < 0) {
-            error_report("unable to get output image length: %s\n",
+            error_report("unable to get output image length: %s",
                          strerror(-output_sectors));
             ret = -1;
             goto out;
@@ -3000,8 +2998,7 @@ static int img_amend(int argc, char **argv)
     if (options) {
         qemu_opts_do_parse(opts, options, NULL, &err);
         if (err) {
-            error_report("Invalid options for file format '%s'", fmt);
-            error_free(err);
+            error_report_err(err);
             ret = -1;
             goto out;
         }
This page took 0.025024 seconds and 4 git commands to generate.