From acebfe4944319aec9ed81ea0dc75dc22774bbf6b Mon Sep 17 00:00:00 2001 From: Asias He Date: Fri, 28 May 2010 15:48:19 +0800 Subject: [PATCH] early_printk.c: add rep/outsb support Signed-off-by: Asias He Signed-off-by: Cyrill Gorcunov --- tools/kvm/early_printk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/kvm/early_printk.c b/tools/kvm/early_printk.c index 02d9cc90ce70..cb2f75e86744 100644 --- a/tools/kvm/early_printk.c +++ b/tools/kvm/early_printk.c @@ -14,8 +14,12 @@ static int early_serial_base = 0x3f8; /* ttyS0 */ static bool early_serial_txr_out(struct kvm *self, uint16_t port, void *data, int size, uint32_t count) { char *p = data; + uint32_t i; - fprintf(stderr, "%c", *p); + for (i = 0; i < count; i++) { + fprintf(stderr, "%c", *p); + p += size; + } fflush(stderr); return true; -- 2.39.5