error.h revision ef421f66f47224a42073deaf087378c5d0c9952e
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer * Automated Testing Framework (atf)
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * All rights reserved.
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer * Redistribution and use in source and binary forms, with or without
d3498432822fb487e58f8f72bb5f880dd8307d7dMichael Sawyer * modification, are permitted provided that the following conditions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * 1. Redistributions of source code must retain the above copyright
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * notice, this list of conditions and the following disclaimer.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * 2. Redistributions in binary form must reproduce the above copyright
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * notice, this list of conditions and the following disclaimer in the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * documentation and/or other materials provided with the distribution.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
c73d8c1b72ddc3330cfc21e2070dffabca324bf7Mark Andrews * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
813d6c9781d1fb48bb5c1d6d3415e65f7be5eeb0Andreas Gustafsson * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
813d6c9781d1fb48bb5c1d6d3415e65f7be5eeb0Andreas Gustafsson * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
813d6c9781d1fb48bb5c1d6d3415e65f7be5eeb0Andreas Gustafsson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
e6e0dadd30fc794b4b75f36ab8d1edb074fd5babMichael Sawyer * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
e6e0dadd30fc794b4b75f36ab8d1edb074fd5babMichael Sawyer * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
0e9dcd548051a8ec34744bfa18b4e09fea742a39Andreas Gustafsson * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
d98372394fd6253336e9c9d580f48bd6ff9710f7Michael Sawyer/* ---------------------------------------------------------------------
c6d2578fd67bc1a427d13fd0699b25a187feec8aMark Andrews * The "atf_error" type.
c6d2578fd67bc1a427d13fd0699b25a187feec8aMark Andrews * --------------------------------------------------------------------- */
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉 void (*m_format)(struct atf_error *, char *, size_t);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉atf_error_t atf_error_new(const char *, void *, size_t,
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉 void (*)(const atf_error_t, char *, size_t));
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉bool atf_error_is(const atf_error_t, const char *);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉const void *atf_error_data(const atf_error_t);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉void atf_error_format(const atf_error_t, char *, size_t);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉/* ---------------------------------------------------------------------
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉 * Common error types.
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉 * --------------------------------------------------------------------- */
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉atf_error_t atf_libc_error(int, const char *, ...);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉int atf_libc_error_code(const atf_error_t);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉const char *atf_libc_error_msg(const atf_error_t);
d8680445d6212d5552ea8a22fd2f9951b11c4b10Tatuya JINMEI 神明達哉#endif /* ATF_C_ERROR_H */