OSDN Git Service

block/raw_bsd: Employ error parameter
authorMax Reitz <mreitz@redhat.com>
Thu, 10 Oct 2013 13:44:00 +0000 (15:44 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 11 Oct 2013 14:50:00 +0000 (16:50 +0200)
Propagate errors in raw_create rather than directly reporting and
afterwards discarding them.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw_bsd.c

index d61906b..0078c1b 100644 (file)
@@ -140,8 +140,7 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
 
     ret = bdrv_create_file(filename, options, &local_err);
     if (error_is_set(&local_err)) {
-        qerror_report_err(local_err);
-        error_free(local_err);
+        error_propagate(errp, local_err);
     }
     return ret;
 }