Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99533
b: refs/heads/master
c: 0922abd
h: refs/heads/master
i:
  99531: 10b02aa
v: v3
  • Loading branch information
Jeremy Fitzhardinge authored and Thomas Gleixner committed May 27, 2008
1 parent 15017a8 commit 7423086
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0acf10d8fbd52926217d3933d196b33fe2468f18
refs/heads/master: 0922abdc3982ae54cbe1b24ac5aa91a260eca1bb
29 changes: 18 additions & 11 deletions trunk/drivers/char/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,27 @@ module_init(xen_init);
module_exit(xen_fini);
console_initcall(xen_cons_init);

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

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

#ifdef CONFIG_EARLY_PRINTK
static void xenboot_write_console(struct console *console, const char *string,
unsigned len)
{
unsigned int linelen, off = 0;
const char *pos;

raw_console_write(string, len);

while (off < len && NULL != (pos = strchr(string+off, '\n'))) {
linelen = pos-string+off;
if (off + linelen > len)
Expand All @@ -155,21 +170,13 @@ static void xenboot_write_console(struct console *console, const char *string,
struct console xenboot_console = {
.name = "xenboot",
.write = xenboot_write_console,
.flags = CON_PRINTBUFFER | CON_BOOT,
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
};
#endif /* CONFIG_EARLY_PRINTK */

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;
}
raw_console_write(str, strlen(str));
}

void xen_raw_printk(const char *fmt, ...)
Expand Down

0 comments on commit 7423086

Please sign in to comment.