2011-12-22 16:19:25 +01:00
|
|
|
/*
|
|
|
|
* \brief Error message handling
|
|
|
|
* \author Sebastian Sumpf
|
|
|
|
* \date 2009-10-26
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2012-01-03 15:35:05 +01:00
|
|
|
* Copyright (C) 2009-2012 Genode Labs GmbH
|
2011-12-22 16:19:25 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
#include <err.h>
|
|
|
|
#include <base/env.h>
|
|
|
|
#include <base/printf.h>
|
|
|
|
|
|
|
|
|
|
|
|
extern "C" void errx(int eval, const char *fmt, ...)
|
|
|
|
{
|
|
|
|
using namespace Genode;
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
va_start(args, fmt);
|
|
|
|
vprintf(fmt, args);
|
|
|
|
va_end(args);
|
|
|
|
env()->parent()->exit(eval);
|
|
|
|
while(1) ;
|
|
|
|
}
|