]> Git Repo - qemu.git/blobdiff - block/cow.c
block: Error parameter for open functions
[qemu.git] / block / cow.c
index e252c95601b8842d9db6132dd25b31733d32a48b..3a93ed99669cf9ede23a9cad41cfdc49684d4c92 100644 (file)
@@ -302,6 +302,7 @@ static int cow_create(const char *filename, QEMUOptionParameter *options,
     struct stat st;
     int64_t image_sectors = 0;
     const char *image_filename = NULL;
+    Error *local_err = NULL;
     int ret;
     BlockDriverState *cow_bs;
 
@@ -320,8 +321,10 @@ static int cow_create(const char *filename, QEMUOptionParameter *options,
         return ret;
     }
 
-    ret = bdrv_file_open(&cow_bs, filename, NULL, BDRV_O_RDWR);
+    ret = bdrv_file_open(&cow_bs, filename, NULL, BDRV_O_RDWR, &local_err);
     if (ret < 0) {
+        qerror_report_err(local_err);
+        error_free(local_err);
         return ret;
     }
 
This page took 0.022188 seconds and 4 git commands to generate.