diff mbox

[v2,18/20] pci-assign: Replace exit() with hw_error()

Message ID 647c39ff193089e194b70f9e5e25b01381112450.1345186746.git.jan.kiszka@siemens.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka Aug. 17, 2012, 6:59 a.m. UTC
This is more appropriate and allows central handling.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/kvm/pci-assign.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
diff mbox

Patch

diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c
index cfd859e..29a4671 100644
--- a/hw/kvm/pci-assign.c
+++ b/hw/kvm/pci-assign.c
@@ -358,10 +358,7 @@  again:
             goto again;
         }
 
-        fprintf(stderr, "%s: pread failed, ret = %zd errno = %d\n",
-                __func__, ret, errno);
-
-        exit(1);
+        hw_error("pci read failed, ret = %zd errno = %d\n", ret, errno);
     }
 
     return val;
@@ -385,10 +382,7 @@  again:
             goto again;
         }
 
-        fprintf(stderr, "%s: pwrite failed, ret = %zd errno = %d\n",
-                __func__, ret, errno);
-
-        exit(1);
+        hw_error("pci write failed, ret = %zd errno = %d\n", ret, errno);
     }
 }