[PATCH 2/6] avivotool, radeonreg: make fatal errors exit

Jonathan Nieder jrnieder at gmail.com
Mon Feb 20 23:44:18 PST 2012


It's safer not to continue once in an erroneous situation.

This reverses a change made in radeontool-1.6.0~28 ("add more ram
dumping stuff") and makes the behavior of avivotool match radeontool
again.

Signed-off-by: Jonathan Nieder <jrnieder at gmail.com>
---
 avivotool.c |    2 +-
 radeonreg.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/avivotool.c b/avivotool.c
index 4f12d113..9a01a9fd 100644
--- a/avivotool.c
+++ b/avivotool.c
@@ -66,7 +66,7 @@ static void die(const char *why)
 {
     fprintf(stderr, "fatal error: %s\n", why);
     pci_system_cleanup();
-
+    exit(-1);
 }
 
 static void radeon_set(unsigned long offset, const char *name, unsigned int value)
diff --git a/radeonreg.c b/radeonreg.c
index 70c27fd4..4d016fd6 100644
--- a/radeonreg.c
+++ b/radeonreg.c
@@ -49,7 +49,7 @@ static void die(const char *why)
 {
     fprintf(stderr, "fatal error: %s\n", why);
     pci_system_cleanup();
-
+    exit(-1);
 }
 
 static void radeon_set(unsigned long offset, const char *name, unsigned int value)
-- 
1.7.9.1



More information about the xorg-driver-ati mailing list