xref: /minix3/minix/lib/libsys/env_panic.c (revision 3956ee9eeda988648c3f2092c7d31faa0a0e7294)
1 #include "sysutil.h"
2 #include <string.h>
3 #include <env.h>
4 
5 /*=========================================================================*
6  *				env_panic				   *
7  *=========================================================================*/
8 void env_panic(const char *key)
9 {
10   static char value[EP_BUF_SIZE] = "<unknown>";
11   int s;
12   if ((s=env_get_param(key, value, sizeof(value))) == 0) {
13   	if (s != ESRCH)		/* only error allowed */
14   	printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
15   }
16   panic("Bad environment setting: '%s = %s'\n", key, value);
17 }
18 
19