diff options
author | Chase Douglas <chase.douglas@canonical.com> | 2012-04-09 09:41:38 -0700 |
---|---|---|
committer | Chase Douglas <chase.douglas@ubuntu.com> | 2012-04-09 10:06:33 -0700 |
commit | 8a8a49f69203c3f7b3ed32ef8dfa47b3de203851 (patch) | |
tree | 036a2434defa04705d81108a7bf1321c22203c4c | |
parent | 3a7a585c753e5c3595d435f9a4960fc01ffe25d2 (diff) |
Log in OsVendorFatalError() in a signal safe mannersignal-logging
The function can be called from a fatal signal handler.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
-rw-r--r-- | hw/xfree86/common/xf86Init.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 2a7d0a37e..bfc9c93ed 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -1056,16 +1056,23 @@ void OsVendorFatalError(const char *f, va_list args) { #ifdef VENDORSUPPORT - ErrorF("\nPlease refer to your Operating System Vendor support pages\n" - "at %s for support on this crash.\n", VENDORSUPPORT); + LogMessageVerbSigSafe(X_NONE, -1, + "\nPlease refer to your Operating System Vendor " + "support pages\nat "); + LogMessageVerbSigSafe(X_NONE, -1, VENDORSUPPORT); + LogMessageVerbSigSafe(X_NONE, -1, " for support on this crash.\n"); #else - ErrorF("\nPlease consult the " XVENDORNAME " support \n" - "\t at " __VENDORDWEBSUPPORT__ "\n for help. \n"); + LogMessageVerbSigSafe(X_NONE, -1, + "\nPlease consult the " XVENDORNAME " support \n" + "\t at " __VENDORDWEBSUPPORT__ "\n for help. \n"); #endif - if (xf86LogFile && xf86LogFileWasOpened) - ErrorF("Please also check the log file at \"%s\" for additional " - "information.\n", xf86LogFile); - ErrorF("\n"); + if (xf86LogFile && xf86LogFileWasOpened) { + LogMessageVerbSigSafe(X_NONE, -1, + "Please also check the log file at \""); + LogMessageVerbSigSafe(X_NONE, -1, xf86LogFile); + LogMessageVerbSigSafe(X_NONE, -1, " for additional information.\n"); + } + LogMessageVerbSigSafe(X_NONE, -1, "\n"); } int |