Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include "iotrack.h"
4
#include "dat.h"
5
#include "fns.h"
6
 
7
#define	SIZE	1024
8
int	chatty;
9
extern int	doabort;
10
 
11
void
12
chat(char *fmt, ...)
13
{
14
	va_list arg;
15
 
16
	if (!chatty)
17
		return;
18
	va_start(arg, fmt);
19
	vfprint(2, fmt, arg);
20
	va_end(arg);
21
}
22
 
23
void
24
panic(char *fmt, ...)
25
{
26
	va_list arg;
27
 
28
	fprint(2, "%s %d: panic ", argv0, getpid());
29
	va_start(arg, fmt);
30
	vfprint(2, fmt, arg);
31
	va_end(arg);
32
	fprint(2, ": %r\n");
33
	if(doabort)
34
		abort();
35
	exits("panic");
36
}