Patchwork [09/10] ssd0323: abort() instead of exit(1) on error.

login
register
mail settings
Submitter Peter Maydell
Date Aug. 13, 2012, 3:31 p.m.
Message ID <1344871919-31559-10-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/176982/
State New
Headers show

Comments

Peter Maydell - Aug. 13, 2012, 3:31 p.m.
From: "Peter A. G. Crosthwaite" <peter.crosthwaite@petalogix.com>

To be more consistent with the newer ways of error signalling. That and SIGABT
is easier to debug with than exit(1).

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 hw/ssd0323.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/ssd0323.c b/hw/ssd0323.c
index b0b2e94..b101c51 100644
--- a/hw/ssd0323.c
+++ b/hw/ssd0323.c
@@ -19,7 +19,9 @@ 
 #define DPRINTF(fmt, ...) \
 do { printf("ssd0323: " fmt , ## __VA_ARGS__); } while (0)
 #define BADF(fmt, ...) \
-do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); exit(1);} while (0)
+do { \
+    fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); abort(); \
+} while (0)
 #else
 #define DPRINTF(fmt, ...) do {} while(0)
 #define BADF(fmt, ...) \