[PATCH 3/4] prefix fatal error messages with "fatal error:"

Jonathan Nieder jrnieder at gmail.com
Fri Dec 2 14:36:30 PST 2011


From: Tormod Volden <debian.tormod at gmail.com>

Let the user know which message corresponds to the error that
caused the tool to exit.

[jn: using "fatal error:" instead of "Error:" for consistency with
"usage:"]

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

diff --git a/avivotool.c b/avivotool.c
index 02b03bab..2b710772 100644
--- a/avivotool.c
+++ b/avivotool.c
@@ -64,7 +64,7 @@ unsigned char * volatile fb_mem;
 
 static void fatal(char *why)
 {
-    fprintf(stderr, "%s", why);
+    fprintf(stderr, "fatal error: %s", why);
     pci_system_cleanup();
 
 }
diff --git a/radeonreg.c b/radeonreg.c
index 5f1ab61d..a1329dbe 100644
--- a/radeonreg.c
+++ b/radeonreg.c
@@ -47,7 +47,7 @@ unsigned char * volatile fb_mem;
 
 static void fatal(char *why)
 {
-    fprintf(stderr, "%s", why);
+    fprintf(stderr, "fatal error: %s", why);
     pci_system_cleanup();
 
 }
diff --git a/radeontool.c b/radeontool.c
index 4cfd2317..25343b3d 100644
--- a/radeontool.c
+++ b/radeontool.c
@@ -39,7 +39,7 @@ unsigned char * volatile ctrl_mem;
 static void radeon_rom_legacy_mmio_table(unsigned char *bios, int offset);
 static void fatal(char *why)
 {
-    fprintf(stderr, "%s", why);
+    fprintf(stderr, "fatal error: %s", why);
     pci_system_cleanup();
     exit(-1);
 }
-- 
1.7.8.rc3



More information about the xorg-driver-ati mailing list