2001-05-16 21:10:51 +05:30
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Utility routines.
|
|
|
|
*
|
2004-03-15 13:59:22 +05:30
|
|
|
* Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
|
2001-05-16 21:10:51 +05:30
|
|
|
*
|
2010-08-16 23:44:46 +05:30
|
|
|
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
2001-05-16 21:10:51 +05:30
|
|
|
*/
|
|
|
|
#include "libbb.h"
|
|
|
|
|
2008-06-27 08:22:20 +05:30
|
|
|
void FAST_FUNC bb_herror_msg(const char *s, ...)
|
2001-05-16 21:10:51 +05:30
|
|
|
{
|
|
|
|
va_list p;
|
|
|
|
|
|
|
|
va_start(p, s);
|
2007-08-16 01:37:53 +05:30
|
|
|
bb_verror_msg(s, p, hstrerror(h_errno));
|
2001-05-16 21:10:51 +05:30
|
|
|
va_end(p);
|
|
|
|
}
|
2010-07-04 20:46:44 +05:30
|
|
|
|
|
|
|
void FAST_FUNC bb_herror_msg_and_die(const char *s, ...)
|
|
|
|
{
|
|
|
|
va_list p;
|
|
|
|
|
|
|
|
va_start(p, s);
|
|
|
|
bb_verror_msg(s, p, hstrerror(h_errno));
|
|
|
|
va_end(p);
|
|
|
|
xfunc_die();
|
|
|
|
}
|