1316099Sngie/*-
2346920Sngie * Copyright (c) 2017 Enji Cooper <ngie@freebsd.org>
3316099Sngie *
4316099Sngie * Redistribution and use in source and binary forms, with or without
5316099Sngie * modification, are permitted provided that the following conditions
6316099Sngie * are met:
7316099Sngie * 1. Redistributions of source code must retain the above copyright
8316099Sngie *    notice, this list of conditions and the following disclaimer.
9316099Sngie * 2. Redistributions in binary form must reproduce the above copyright
10316099Sngie *    notice, this list of conditions and the following disclaimer in the
11316099Sngie *    documentation and/or other materials provided with the distribution.
12316099Sngie *
13316099Sngie * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14316099Sngie * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15316099Sngie * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16316099Sngie * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17316099Sngie * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18316099Sngie * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19316099Sngie * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20316099Sngie * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21316099Sngie * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22316099Sngie * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23316099Sngie * SUCH DAMAGE.
24316099Sngie */
25316099Sngie
26316099Sngie#include <sys/cdefs.h>
27316099Sngie__FBSDID("$FreeBSD: stable/11/lib/libkvm/tests/kvm_test_common.c 346920 2019-04-29 19:36:46Z ngie $");
28316099Sngie
29316099Sngie#include <sys/types.h>
30316099Sngie#include <string.h>
31316099Sngie
32316099Sngie#include "kvm_test_common.h"
33316099Sngie
34316099Sngiechar	errbuf[_POSIX2_LINE_MAX];
35316099Sngie
36316099Sngievoid
37316099Sngieerrbuf_clear(void)
38316099Sngie{
39316099Sngie
40316099Sngie	strcpy(errbuf, "");
41316099Sngie}
42316099Sngie
43316099Sngiebool
44316099Sngieerrbuf_has_error(const char *_errbuf)
45316099Sngie{
46316099Sngie
47316099Sngie	return (strcmp(_errbuf, ""));
48316099Sngie}
49