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