qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v1 23/25] scsi: Update error API usages


From: Peter Crosthwaite
Subject: [Qemu-devel] [RFC PATCH v1 23/25] scsi: Update error API usages
Date: Thu, 10 Sep 2015 22:33:33 -0700

Use the prefix + propagate combo rather than manual prefix + freeing.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
---

 hw/scsi/vhost-scsi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 7eacca9..bd55ebc 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -219,9 +219,8 @@ static void vhost_scsi_realize(DeviceState *dev, Error 
**errp)
     if (vs->conf.vhostfd) {
         vhostfd = monitor_fd_param(cur_mon, vs->conf.vhostfd, &err);
         if (vhostfd == -1) {
-            error_setg(errp, "vhost-scsi: unable to parse vhostfd: %s",
-                       error_get_pretty(err));
-            error_free(err);
+            error_prefix(err, "vhost-scsi: unable to parse vhostfd: ");
+            error_propagate(errp, err);
             return;
         }
     } else {
-- 
1.9.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]