[PATCH] qemu: unicore32: Add support for non-curses display
From: Guenter Roeck
Date: Tue Sep 02 2014 - 23:55:02 EST
Add basic support for DT_NONE and DT_NOGRAPHIC display types.
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
target-unicore32/helper.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c
index e5ebbf4..dda3772 100644
--- a/target-unicore32/helper.c
+++ b/target-unicore32/helper.c
@@ -13,6 +13,7 @@
#include "exec/gdbstub.h"
#include "exec/helper-proto.h"
#include "qemu/host-utils.h"
+#include "sysemu/sysemu.h"
#ifndef CONFIG_USER_ONLY
#include "ui/console.h"
#endif
@@ -223,7 +224,18 @@ static void putc_on_screen(unsigned char ch)
void helper_cp1_putc(target_ulong x)
{
- putc_on_screen((unsigned char)x); /* Output to screen */
+ switch(display_type) {
+ case DT_CURSES:
+ putc_on_screen((unsigned char)x); /* Output to screen */
+ break;
+ case DT_NOGRAPHIC:
+ case DT_NONE:
+ putchar((int)x);
+ break;
+ default:
+ break;
+ }
+
DPRINTF("%c", x); /* Output to stdout */
}
#endif
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/