]> xenbits.xensource.com Git - people/aperard/linux-chromebook.git/commitdiff
force printk to xen.
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 25 Feb 2013 18:26:12 +0000 (18:26 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 28 Feb 2013 20:13:35 +0000 (20:13 +0000)
kernel/printk.c

index 363718dc060b671864fef236020e0c7a5a44d9c3..bd34ce753d26b6b51764b2cf058de56339be552f 100644 (file)
@@ -754,8 +754,11 @@ static int have_callable_console(void)
  * See the vsnprintf() documentation for format string extensions over C99.
  */
 
+extern void xen_raw_console_write(const char *str);
+
 asmlinkage int printk(const char *fmt, ...)
 {
+#if 1
        va_list args;
        int r;
 
@@ -772,6 +775,17 @@ asmlinkage int printk(const char *fmt, ...)
        va_end(args);
 
        return r;
+#else
+       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);
+       return 0;
+#endif
 }
 
 /* cpu currently holding logbuf_lock */