2005-04-21 16:53:53 +02:00
|
|
|
#include "utils.h"
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
/*=========================================================================*
|
|
|
|
* env_panic *
|
|
|
|
*=========================================================================*/
|
|
|
|
PUBLIC void env_panic(key)
|
|
|
|
char *key; /* environment variable whose value is bogus */
|
|
|
|
{
|
|
|
|
static char value[EP_BUF_SIZE] = "<unknown>";
|
|
|
|
int s;
|
2005-06-03 15:55:06 +02:00
|
|
|
if ((s=get_mon_param(key, value, sizeof(value))) == 0) {
|
2005-04-21 16:53:53 +02:00
|
|
|
if (s != ESRCH) /* only error allowed */
|
2005-06-03 15:55:06 +02:00
|
|
|
printf("WARNING: get_mon_param() failed in env_panic(): %d\n", s);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
|
|
|
printf("Bad environment setting: '%s = %s'\n", key, value);
|
2005-06-01 16:31:00 +02:00
|
|
|
panic("","", NO_NUM);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
|
|
|
|