os: Pass the FatalError message to OsVendorFatalError
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
0bb8a2566d
commit
a818b30598
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -110,9 +110,6 @@ VFatalError(const char *format, va_list args)
|
|||
{
|
||||
VErrorF(format, args);
|
||||
ErrorF("\n");
|
||||
#ifdef DDXOSFATALERROR
|
||||
OsVendorFatalError();
|
||||
#endif
|
||||
AbortServer();
|
||||
/*NOTREACHED*/}
|
||||
#endif
|
||||
|
|
|
@ -1104,7 +1104,7 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
|||
}
|
||||
|
||||
void
|
||||
OsVendorFatalError(void)
|
||||
OsVendorFatalError(const char *f, va_list args)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ OsVendorInit(void)
|
|||
}
|
||||
|
||||
void
|
||||
OsVendorFatalError(void)
|
||||
OsVendorFatalError(const char *f, va_list args)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -142,7 +142,7 @@ OsVendorInit(void)
|
|||
}
|
||||
|
||||
void
|
||||
OsVendorFatalError(void)
|
||||
OsVendorFatalError(const char *f, va_list args)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
18
os/log.c
18
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();
|
||||
|
|
|
@ -50,7 +50,7 @@ OsVendorInit(void)
|
|||
}
|
||||
|
||||
void
|
||||
OsVendorFatalError(void)
|
||||
OsVendorFatalError(const char *f, va_list args)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue