phunix/minix/lib/libsys/env_panic.c
Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

18 lines
554 B
C

#include "sysutil.h"
#include <string.h>
/*=========================================================================*
* env_panic *
*=========================================================================*/
void env_panic(const char *key)
{
static char value[EP_BUF_SIZE] = "<unknown>";
int s;
if ((s=env_get_param(key, value, sizeof(value))) == 0) {
if (s != ESRCH) /* only error allowed */
printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
}
panic("Bad environment setting: '%s = %s'\n", key, value);
}