Index: sys/amd64/include/xen/xen-os.h =================================================================== --- sys/amd64/include/xen/xen-os.h (revisione 237379) +++ sys/amd64/include/xen/xen-os.h (copia locale) @@ -75,6 +75,7 @@ void bootmem_free(void *ptr, unsigned int size); #include void printk(const char *fmt, ...); +void vprintk(const char *fmt, __va_list ap); /* some function prototypes */ void trap_init(void); Index: sys/amd64/xen/machdep.c =================================================================== --- sys/amd64/xen/machdep.c (revisione 237379) +++ sys/amd64/xen/machdep.c (copia locale) @@ -1037,12 +1037,19 @@ void printk(const char *fmt, ...) { __va_list ap; + + va_start(ap, fmt); + vprintk(fmt, ap); + va_end(ap); +} + +void +vprintk(const char *fmt, __va_list ap) +{ int retval; static char buf[PRINTK_BUFSIZE]; - va_start(ap, fmt); retval = vsnprintf(buf, PRINTK_BUFSIZE - 1, fmt, ap); - va_end(ap); buf[retval] = 0; (void)HYPERVISOR_console_write(buf, retval); } Index: sys/kern/kern_shutdown.c =================================================================== --- sys/kern/kern_shutdown.c (revisione 237379) +++ sys/kern/kern_shutdown.c (copia locale) @@ -611,6 +611,9 @@ panic(const char *fmt, ...) } va_start(ap, fmt); +#ifdef XEN + vprintk(fmt, ap); +#endif if (newpanic) { (void)vsnprintf(buf, sizeof(buf), fmt, ap); panicstr = buf;