xref: /freebsd/lib/libkvm/tests/kvm_test_common.h (revision 148a8da8d98ce7d4ec6709ebbb580a4f94316084)
110f81a9bSEnji Cooper /*-
2*148a8da8SEnji Cooper  * Copyright (c) 2017 Enji Cooper <ngie@freebsd.org>
310f81a9bSEnji Cooper  *
410f81a9bSEnji Cooper  * Redistribution and use in source and binary forms, with or without
510f81a9bSEnji Cooper  * modification, are permitted provided that the following conditions
610f81a9bSEnji Cooper  * are met:
710f81a9bSEnji Cooper  * 1. Redistributions of source code must retain the above copyright
810f81a9bSEnji Cooper  *    notice, this list of conditions and the following disclaimer.
910f81a9bSEnji Cooper  * 2. Redistributions in binary form must reproduce the above copyright
1010f81a9bSEnji Cooper  *    notice, this list of conditions and the following disclaimer in the
1110f81a9bSEnji Cooper  *    documentation and/or other materials provided with the distribution.
1210f81a9bSEnji Cooper  *
1310f81a9bSEnji Cooper  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1410f81a9bSEnji Cooper  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1510f81a9bSEnji Cooper  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1610f81a9bSEnji Cooper  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
1710f81a9bSEnji Cooper  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1810f81a9bSEnji Cooper  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1910f81a9bSEnji Cooper  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2010f81a9bSEnji Cooper  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2110f81a9bSEnji Cooper  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2210f81a9bSEnji Cooper  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2310f81a9bSEnji Cooper  * SUCH DAMAGE.
2410f81a9bSEnji Cooper  *
2510f81a9bSEnji Cooper  * $FreeBSD$
2610f81a9bSEnji Cooper  */
2710f81a9bSEnji Cooper 
2810f81a9bSEnji Cooper #ifndef	__KVM_TEST_COMMON_H__
2910f81a9bSEnji Cooper 
3010f81a9bSEnji Cooper #include <sys/types.h>
3110f81a9bSEnji Cooper #include <limits.h>
3210f81a9bSEnji Cooper #include <stdbool.h>
3310f81a9bSEnji Cooper 
3410f81a9bSEnji Cooper extern char	errbuf[_POSIX2_LINE_MAX];
3510f81a9bSEnji Cooper 
3610f81a9bSEnji Cooper void	errbuf_clear(void);
3710f81a9bSEnji Cooper bool	errbuf_has_error(const char *);
3810f81a9bSEnji Cooper 
3910f81a9bSEnji Cooper #endif
40