minix3/commands/service/util.c

29 lines
419 B
C

#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
void fatal(char *fmt, ...)
{
va_list ap;
fprintf(stderr, "service: fatal error: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
exit(1);
}
void warning(char *fmt, ...)
{
va_list ap;
fprintf(stderr, "service: warning: ");
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
}