Revision cc84d90f qemu-img.c

b/qemu-img.c
1139 1139
    float local_progress = 0;
1140 1140
    int min_sparse = 8; /* Need at least 4k of zeros for sparse detection */
1141 1141
    bool quiet = false;
1142
    Error *local_err = NULL;
1142 1143

  
1143 1144
    fmt = NULL;
1144 1145
    out_fmt = "raw";
......
1341 1342

  
1342 1343
    if (!skip_create) {
1343 1344
        /* Create the new image */
1344
        ret = bdrv_create(drv, out_filename, param);
1345
        ret = bdrv_create(drv, out_filename, param, &local_err);
1345 1346
        if (ret < 0) {
1346
            if (ret == -ENOTSUP) {
1347
                error_report("Formatting not supported for file format '%s'",
1348
                             out_fmt);
1349
            } else if (ret == -EFBIG) {
1350
                error_report("The image size is too large for file format '%s'",
1351
                             out_fmt);
1352
            } else {
1353
                error_report("%s: error while converting %s: %s",
1354
                             out_filename, out_fmt, strerror(-ret));
1355
            }
1347
            error_report("%s: error while converting %s: %s",
1348
                         out_filename, out_fmt, error_get_pretty(local_err));
1349
            error_free(local_err);
1356 1350
            goto out;
1357 1351
        }
1358 1352
    }

Also available in: Unified diff