genode/os/src/lib/ldso/err.cc
Christian Prochaska e6c7596af5 ldso: flush the log console in 'errx()'
The error message given to the 'errx()' function does not always contain a
'\n' character. Adding 'printf("\n")' ensures that the message appears on
the log console.

Fixes #1103.
2014-03-31 21:05:48 +02:00

30 lines
558 B
C++

/*
* \brief Error message handling
* \author Sebastian Sumpf
* \date 2009-10-26
*/
/*
* Copyright (C) 2009-2013 Genode Labs GmbH
*
* 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);
printf("\n");
env()->parent()->exit(eval);
while(1) ;
}