Patchwork [v5,08/15] ssd0323: abort() instead of exit(1) on error.

login
register
mail settings
Submitter Peter A. G. Crosthwaite
Date Aug. 6, 2012, 2:16 a.m.
Message ID <f3540ec4ad285f12fe68df283be0893b918d01b6.1344218410.git.peter.crosthwaite@petalogix.com>
Download mbox | patch
Permalink /patch/175239/
State New
Headers show

Comments

Peter A. G. Crosthwaite - Aug. 6, 2012, 2:16 a.m.
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>
---
 hw/ssd0323.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Peter Maydell - Aug. 6, 2012, 9:41 a.m.
On 6 August 2012 03:16, Peter A. G. Crosthwaite
<peter.crosthwaite@petalogix.com> wrote:
> 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>

-- PMM
Peter A. G. Crosthwaite - Aug. 10, 2012, 11:31 p.m.
On Mon, Aug 6, 2012 at 7:41 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 6 August 2012 03:16, Peter A. G. Crosthwaite
> <peter.crosthwaite@petalogix.com> wrote:
>> 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>
>

This is independent of the rest of the series, do we want to en-queue
to arm-devs and ill remove from series? One less diff for me and one
less spam for the mailing list :)

Regards,
Peter

> -- PMM
Peter Maydell - Aug. 11, 2012, 7:01 p.m.
On 11 August 2012 00:31, Peter Crosthwaite
<peter.crosthwaite@petalogix.com> wrote:
> On Mon, Aug 6, 2012 at 7:41 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>> On 6 August 2012 03:16, Peter A. G. Crosthwaite
>> <peter.crosthwaite@petalogix.com> wrote:
>>> 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>
>>
>
> This is independent of the rest of the series, do we want to en-queue
> to arm-devs and ill remove from series? One less diff for me and one
> less spam for the mailing list :)

Might as well. Applied to arm-devs.next.

-- PMM

Patch

diff --git a/hw/ssd0323.c b/hw/ssd0323.c
index d8a0c14..0800866 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, ...) \