freebsd-skq/sbin/dhclient/tests/fake.c
jmmv f965a606e8 Migrate tools/regression/sbin/ to the new tests layout.
Pretty much all that this change does is shuffles the code around and hooks
it into the regular build.  The code of the old tests has not changed.
2014-03-16 02:07:08 +00:00

65 lines
777 B
C

/* $FreeBSD$ */
#include <setjmp.h>
#include <stdarg.h>
#include <stdio.h>
#include "dhcpd.h"
extern jmp_buf env;
void
error(char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
longjmp(env, 1);
}
int
warning(char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
/*
* The original warning() would return "ret" here. We do this to
* check warnings explicitely.
*/
longjmp(env, 1);
}
int
note(char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n");
return ret;
}
void
bootp(struct packet *packet)
{
}
void
dhcp(struct packet *packet)
{
}