diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2012-02-17 12:35:02 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2012-03-24 01:07:05 -0700 |
commit | a818b305989bbcde4e585112a7ee70cbc0b14a92 (patch) | |
tree | d2d57eb286020a618371ed431797c671b183956b /os | |
parent | 0bb8a2566debd6cd11164df9ddca534150ec440a (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>
Diffstat (limited to 'os')
-rw-r--r-- | os/log.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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(); |