|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [Patch] support small buffer to read_console_ring()
Hi,
read_console_ring() hung up when we pass smaller buffer than conringp -
configc.
Doesn't read_console_ring() support small buffer than CONRING_SIZE?
I make a patch to support small buffer of read_console_ring.
Am I right?
Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
diff -r aa2298739112 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c Fri Jun 09 10:40:31 2006 -0600
+++ b/xen/drivers/char/console.c Sun Jun 11 10:14:04 2006 +0900
@@ -238,6 +238,8 @@ long read_console_ring(XEN_GUEST_HANDLE(
len = CONRING_SIZE - idx;
if ( (sofar + len) > max )
len = max - sofar;
+ if ( len == 0 )
+ break;
if ( copy_to_guest_offset(str, sofar, &conring[idx], len) )
return -EFAULT;
sofar += len;
@@ -247,7 +249,7 @@ long read_console_ring(XEN_GUEST_HANDLE(
if ( clear )
{
spin_lock_irqsave(&console_lock, flags);
- conringc = conringp;
+ conringc += sofar;
spin_unlock_irqrestore(&console_lock, flags);
}
Best Regards,
Akio Takebe
fix_readconsolering.patch
Description: Binary data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [Patch] support small buffer to read_console_ring(),
Akio Takebe <=
|
|
|
|
|