minix/lib/utils/env_panic.c
Jorrit Herder f2a85e58d9 Various updates.
* Removed some variants of the SYS_GETINFO calls from the kernel;
  replaced them with new PM and utils libary functionality. Fixed
  bugs in utils library that used old get_kenv() variant.
* Implemented a buffer in the kernel to gather random data.
  Memory driver periodically checks this for /dev/random.
  A better random algorithm can now be implemented in the driver.
  Removed SYS_RANDOM; the SYS_GETINFO call is used instead.
* Remove SYS_KMALLOC from the kernel. Memory allocation can now
  be done at the process manager with new 'other' library functions.
2005-06-03 13:55:06 +00:00

20 lines
632 B
C

#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;
if ((s=get_mon_param(key, value, sizeof(value))) == 0) {
if (s != ESRCH) /* only error allowed */
printf("WARNING: get_mon_param() failed in env_panic(): %d\n", s);
}
printf("Bad environment setting: '%s = %s'\n", key, value);
panic("","", NO_NUM);
}