* Macros to use the console mutex
*
* The lock is not used when the kernel is panicing as it will never recover
- * and we want to output no matter it costs.
+ * and we want to output no matter what it costs.
*/
#define CN_LOCK(cons) \
do { \
int err;
err = xen_intr_bind_virq(dev, VIRQ_CONSOLE, 0, NULL,
- xencons_intr, tp,
- INTR_TYPE_TTY, &cons->intr_handle);
+ xencons_intr, tp, INTR_TYPE_TTY, &cons->intr_handle);
if (err)
printf("Can't register console interrupt\n");
return (ENODEV);
err = xen_intr_bind_local_port(dev, cons->evtchn, NULL,
- xencons_intr, tp,
- INTR_TYPE_MISC | INTR_MPSAFE,
- &cons->intr_handle);
+ xencons_intr, tp, INTR_TYPE_MISC | INTR_MPSAFE,
+ &cons->intr_handle);
if (err != 0)
return (err);
if (sz > (WBUF_SIZE - WBUF_MASK(cons->wc)))
sz = WBUF_SIZE - WBUF_MASK(cons->wc);
sent = xencons_write(cons, &cons->wbuf[WBUF_MASK(cons->wc)],
- sz);
+ sz);
/*
* The other end may not have been initialized. Ignore
if (!xencons_tx(tp))
callout_reset(&cons->callout, XC_POLLTIME,
- xencons_timeout, tp);
+ xencons_timeout, tp);
}
static void
if (!xencons_tx(tp))
callout_reset(&cons->callout, XC_POLLTIME,
- xencons_timeout, tp);
+ xencons_timeout, tp);
}
static struct ttydevsw xc_ttydevsw = {
err = xencons_init(dev, tp);
if (err) {
printf("xencons: Unable to initialize the console (%d)\n",
- err);
+ err);
return err;
}
/* register handler to flush console on shutdown */
if ((EVENTHANDLER_REGISTER(shutdown_post_sync, xencons_shutdown,
- tp, SHUTDOWN_PRI_DEFAULT)) == NULL)
+ tp, SHUTDOWN_PRI_DEFAULT)) == NULL)
printf("xencons: shutdown event registration failed!\n");
return (0);