void cfg_warn (char *msg,...) { va_list ap; va_start (ap, msg); prom_printf ("Config file warning: "); prom_vprintf (msg, ap); va_end (ap); prom_printf (" near line %d in file %s\n", line_num, file_name); }
void cfg_error (char *msg,...) { va_list ap; va_start (ap, msg); prom_printf ("Config file error: "); prom_vprintf (msg, ap); va_end (ap); prom_printf (" near line %d in file %s\n", line_num, file_name); longjmp (env, 1); }
/*PRINTFLIKE1*/ void panic(const char *fmt, ...) { va_list adx; /* turn on output */ verbosemode = 1; printf("panic: "); va_start(adx, fmt); prom_vprintf(fmt, adx); va_end(adx); printf("Press any key to reboot\n"); (void) getchar(); printf("rebooting...\n"); reset(); }
void px_dbg(px_debug_bit_t bit, dev_info_t *dip, char *fmt, ...) { int cont = bit >> DBG_BITS; va_list ap; bit &= DBG_MASK; if (bit >= sizeof (px_debug_sym) / sizeof (char *)) return; if (!(1ull << bit & px_debug_flags)) return; if (cont) goto body; if (dip) prom_printf("%s(%d): %s: ", ddi_driver_name(dip), ddi_get_instance(dip), px_debug_sym[bit]); else prom_printf("px: %s: ", px_debug_sym[bit]); body: va_start(ap, fmt); prom_vprintf(fmt, ap); va_end(ap); }