Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99532
b: refs/heads/master
c: 0acf10d
h: refs/heads/master
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Thomas Gleixner committed May 27, 2008
1 parent 10b02aa commit 15017a8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3843fc2575e3389f4f0ad0420a720240a5746a5d
refs/heads/master: 0acf10d8fbd52926217d3933d196b33fe2468f18
26 changes: 26 additions & 0 deletions trunk/drivers/char/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,29 @@ struct console xenboot_console = {
.write = xenboot_write_console,
.flags = CON_PRINTBUFFER | CON_BOOT,
};

void xen_raw_console_write(const char *str)
{
int len = strlen(str);

while(len > 0) {
int rc = HYPERVISOR_console_io(CONSOLEIO_write, len, (char *)str);
if (rc <= 0)
break;

str += rc;
len -= rc;
}
}

void xen_raw_printk(const char *fmt, ...)
{
static char buf[512];
va_list ap;

va_start(ap, fmt);
vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);

xen_raw_console_write(buf);
}
3 changes: 3 additions & 0 deletions trunk/include/xen/hvc-console.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

extern struct console xenboot_console;

void xen_raw_console_write(const char *str);
void xen_raw_printk(const char *fmt, ...);

#endif /* XEN_HVC_CONSOLE_H */

0 comments on commit 15017a8

Please sign in to comment.