ia64/xen-unstable

view xen/common/console.c @ 938:eaaf88bbc222

bitkeeper revision 1.597 (3fb26743975c08pGlW-UntXWf-IBnQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/br260/xeno.bk
author br260@labyrinth.cl.cam.ac.uk
date Wed Nov 12 17:00:51 2003 +0000 (2003-11-12)
parents 106bc1c68738
children 151801bd4e5e
line source
1 /*
2 * console.c
3 *
4 * read domain console output buffer ring in Xen
5 *
6 */
8 #include <xeno/console.h>
9 #include <asm-i386/uaccess.h>
11 void init_console_ring()
12 {
13 console_ring.len = 0;
14 }
16 long read_console_ring(char *str, unsigned int count)
17 {
18 unsigned int len;
20 len = (console_ring.len < count)? console_ring.len : count;
22 if ( copy_to_user(str, console_ring.buf, len) )
23 return -EFAULT;
25 return len;
26 }