mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-15 11:20:03 +00:00
21 lines
323 B
C
21 lines
323 B
C
#include <lib9.h>
|
|
|
|
void (*_sysfatal)(char*, ...);
|
|
|
|
void
|
|
sysfatal(char *fmt, ...)
|
|
{
|
|
char buf[256];
|
|
va_list arg;
|
|
|
|
va_start(arg, fmt);
|
|
if(_sysfatal)
|
|
(*_sysfatal)(fmt, arg);
|
|
vseprint(buf, buf+sizeof buf, fmt, arg);
|
|
va_end(arg);
|
|
|
|
__fixargv0();
|
|
fprint(2, "%s: %s\n", argv0 ? argv0 : "<prog>", buf);
|
|
exits("fatal");
|
|
}
|
|
|