2005-07-19 15:21:51 +02:00
|
|
|
#include "sysutil.h"
|
2005-04-21 16:53:53 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/*=========================================================================*
|
|
|
|
* env_panic *
|
|
|
|
*=========================================================================*/
|
2013-08-20 14:02:33 +02:00
|
|
|
void env_panic(const char *key)
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
static char value[EP_BUF_SIZE] = "<unknown>";
|
|
|
|
int s;
|
2005-08-05 16:20:05 +02:00
|
|
|
if ((s=env_get_param(key, value, sizeof(value))) == 0) {
|
2005-04-21 16:53:53 +02:00
|
|
|
if (s != ESRCH) /* only error allowed */
|
2009-05-10 18:54:37 +02:00
|
|
|
printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
2013-08-26 18:43:05 +02:00
|
|
|
panic("Bad environment setting: '%s = %s'\n", key, value);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
|
|
|
|