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
|
* two routines mentioned here, as well as by others) to use the
|
||||||
* referenced routine instead of \a vfprintf().) */
|
* referenced routine instead of \a vfprintf().) */
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,9 +110,6 @@ VFatalError(const char *format, va_list args)
|
||||||
{
|
{
|
||||||
VErrorF(format, args);
|
VErrorF(format, args);
|
||||||
ErrorF("\n");
|
ErrorF("\n");
|
||||||
#ifdef DDXOSFATALERROR
|
|
||||||
OsVendorFatalError();
|
|
||||||
#endif
|
|
||||||
AbortServer();
|
AbortServer();
|
||||||
/*NOTREACHED*/}
|
/*NOTREACHED*/}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -219,7 +219,7 @@ OsVendorInit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1053,7 +1053,7 @@ AbortDDX(enum ExitCode error)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
#ifdef VENDORSUPPORT
|
#ifdef VENDORSUPPORT
|
||||||
ErrorF("\nPlease refer to your Operating System Vendor support pages\n"
|
ErrorF("\nPlease refer to your Operating System Vendor support pages\n"
|
||||||
|
|
|
@ -142,7 +142,7 @@ OsVendorInit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -634,7 +634,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
|
||||||
* OsVendorFatalError
|
* OsVendorFatalError
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
ErrorF(" OsVendorFatalError\n");
|
ErrorF(" OsVendorFatalError\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args)
|
||||||
* Attempt to do last-ditch, safe, important cleanup here.
|
* Attempt to do last-ditch, safe, important cleanup here.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
/* Don't give duplicate warning if UseMsg was called */
|
/* Don't give duplicate warning if UseMsg was called */
|
||||||
if (g_fSilentFatalError)
|
if (g_fSilentFatalError)
|
||||||
|
|
|
@ -321,7 +321,7 @@ extern _X_EXPORT void
|
||||||
OsCleanup(Bool);
|
OsCleanup(Bool);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
OsVendorFatalError(void);
|
OsVendorFatalError(const char *f, va_list args);
|
||||||
|
|
||||||
extern _X_EXPORT void
|
extern _X_EXPORT void
|
||||||
OsVendorInit(void);
|
OsVendorInit(void);
|
||||||
|
|
18
os/log.c
18
os/log.c
|
@ -593,6 +593,7 @@ void
|
||||||
FatalError(const char *f, ...)
|
FatalError(const char *f, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
va_list args2;
|
||||||
static Bool beenhere = FALSE;
|
static Bool beenhere = FALSE;
|
||||||
|
|
||||||
if (beenhere)
|
if (beenhere)
|
||||||
|
@ -600,22 +601,25 @@ FatalError(const char *f, ...)
|
||||||
else
|
else
|
||||||
ErrorF("\nFatal server error:\n");
|
ErrorF("\nFatal server error:\n");
|
||||||
|
|
||||||
va_start(args, f);
|
/* Make a copy for OsVendorFatalError */
|
||||||
|
va_copy(args2, args);
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
{
|
{
|
||||||
va_list args2;
|
va_list apple_args;
|
||||||
|
|
||||||
va_copy(args2, args);
|
va_copy(apple_args, args);
|
||||||
(void) vsnprintf(__crashreporter_info_buff__,
|
(void)vsnprintf(__crashreporter_info_buff__,
|
||||||
sizeof(__crashreporter_info_buff__), f, args2);
|
sizeof(__crashreporter_info_buff__), f, apple_args);
|
||||||
va_end(args2);
|
va_end(apple_args);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
VErrorF(f, args);
|
VErrorF(f, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
ErrorF("\n");
|
ErrorF("\n");
|
||||||
if (!beenhere)
|
if (!beenhere)
|
||||||
OsVendorFatalError();
|
OsVendorFatalError(f, args2);
|
||||||
|
va_end(args2);
|
||||||
if (!beenhere) {
|
if (!beenhere) {
|
||||||
beenhere = TRUE;
|
beenhere = TRUE;
|
||||||
AbortServer();
|
AbortServer();
|
||||||
|
|
|
@ -50,7 +50,7 @@ OsVendorInit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
OsVendorFatalError(void)
|
OsVendorFatalError(const char *f, va_list args)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue