summaryrefslogtreecommitdiff
path: root/minix/lib/libsys/env_panic.c
blob: 4ca0dcd42bca01d5db613061f5e909f921e121f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#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);
}