summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2012-02-17 12:35:02 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2012-03-24 01:07:05 -0700
commita818b305989bbcde4e585112a7ee70cbc0b14a92 (patch)
treed2d57eb286020a618371ed431797c671b183956b
parent0bb8a2566debd6cd11164df9ddca534150ec440a (diff)
os: Pass the FatalError message to OsVendorFatalError
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--hw/dmx/dmxinit.c2
-rw-r--r--hw/dmx/dmxlog.c3
-rw-r--r--hw/kdrive/src/kdrive.c2
-rw-r--r--hw/vfb/InitOutput.c2
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xnest/Init.c2
-rw-r--r--hw/xquartz/darwin.c2
-rw-r--r--hw/xwin/winerror.c2
-rw-r--r--include/os.h2
-rw-r--r--os/log.c18
-rw-r--r--test/ddxstubs.c2
11 files changed, 20 insertions, 19 deletions
diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c
index 09e3d74ea..5804353fb 100644
--- a/hw/dmx/dmxinit.c
+++ b/hw/dmx/dmxinit.c
@@ -905,7 +905,7 @@ OsVendorInit(void)
* two routines mentioned here, as well as by others) to use the
* referenced routine instead of \a vfprintf().) */
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
}
diff --git a/hw/dmx/dmxlog.c b/hw/dmx/dmxlog.c
index b56bb93ed..33aee590a 100644
--- a/hw/dmx/dmxlog.c
+++ b/hw/dmx/dmxlog.c
@@ -110,9 +110,6 @@ VFatalError(const char *format, va_list args)
{
VErrorF(format, args);
ErrorF("\n");
-#ifdef DDXOSFATALERROR
- OsVendorFatalError();
-#endif
AbortServer();
/*NOTREACHED*/}
#endif
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index f65ab96bc..ecdae1921 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -1104,7 +1104,7 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
}
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
}
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index 2d679a559..e2cd96cdc 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -219,7 +219,7 @@ OsVendorInit(void)
}
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
}
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 0974893d3..2a7d0a37e 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1053,7 +1053,7 @@ AbortDDX(enum ExitCode error)
}
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
#ifdef VENDORSUPPORT
ErrorF("\nPlease refer to your Operating System Vendor support pages\n"
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 0909826d9..330b8ca17 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -142,7 +142,7 @@ OsVendorInit(void)
}
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
return;
}
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 29036fc77..3dd41cba8 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
* OsVendorFatalError
*/
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
ErrorF(" OsVendorFatalError\n");
}
diff --git a/hw/xwin/winerror.c b/hw/xwin/winerror.c
index 4049e9735..a25307cb6 100644
--- a/hw/xwin/winerror.c
+++ b/hw/xwin/winerror.c
@@ -70,7 +70,7 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args)
* Attempt to do last-ditch, safe, important cleanup here.
*/
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
/* Don't give duplicate warning if UseMsg was called */
if (g_fSilentFatalError)
diff --git a/include/os.h b/include/os.h
index dd06a8578..166c60cd8 100644
--- a/include/os.h
+++ b/include/os.h
@@ -321,7 +321,7 @@ extern _X_EXPORT void
OsCleanup(Bool);
extern _X_EXPORT void
-OsVendorFatalError(void);
+OsVendorFatalError(const char *f, va_list args);
extern _X_EXPORT void
OsVendorInit(void);
diff --git a/os/log.c b/os/log.c
index 1b1b28519..9a719696c 100644
--- a/os/log.c
+++ b/os/log.c
@@ -593,6 +593,7 @@ void
FatalError(const char *f, ...)
{
va_list args;
+ va_list args2;
static Bool beenhere = FALSE;
if (beenhere)
@@ -600,22 +601,25 @@ FatalError(const char *f, ...)
else
ErrorF("\nFatal server error:\n");
- va_start(args, f);
+ /* Make a copy for OsVendorFatalError */
+ va_copy(args2, args);
+
#ifdef __APPLE__
{
- va_list args2;
+ va_list apple_args;
- va_copy(args2, args);
- (void) vsnprintf(__crashreporter_info_buff__,
- sizeof(__crashreporter_info_buff__), f, args2);
- va_end(args2);
+ va_copy(apple_args, args);
+ (void)vsnprintf(__crashreporter_info_buff__,
+ sizeof(__crashreporter_info_buff__), f, apple_args);
+ va_end(apple_args);
}
#endif
VErrorF(f, args);
va_end(args);
ErrorF("\n");
if (!beenhere)
- OsVendorFatalError();
+ OsVendorFatalError(f, args2);
+ va_end(args2);
if (!beenhere) {
beenhere = TRUE;
AbortServer();
diff --git a/test/ddxstubs.c b/test/ddxstubs.c
index a214b9637..3647dc556 100644
--- a/test/ddxstubs.c
+++ b/test/ddxstubs.c
@@ -50,7 +50,7 @@ OsVendorInit(void)
}
void
-OsVendorFatalError(void)
+OsVendorFatalError(const char *f, va_list args)
{
}