direct-io.hg

changeset 461:0086e866c0d6

bitkeeper revision 1.239 (3ec4fb8aMeMTm7_6dfdrGcBeicV-AQ)

kernel.c:
Another minor cleanup of the console UDP code.
author kaf24@scramble.cl.cam.ac.uk
date Fri May 16 14:54:02 2003 +0000 (2003-05-16)
parents 51cfa3382a1c
children 8e1863a63358 a40b7ac800c1
files xen/common/kernel.c
line diff
     1.1 --- a/xen/common/kernel.c	Fri May 16 13:47:17 2003 +0000
     1.2 +++ b/xen/common/kernel.c	Fri May 16 14:54:02 2003 +0000
     1.3 @@ -574,7 +574,7 @@ long do_console_write(char *str, unsigne
     1.4  {
     1.5  #define SIZEOF_BUF 256
     1.6      unsigned char safe_str[SIZEOF_BUF];
     1.7 -    unsigned char exported_str[SIZEOF_BUF];
     1.8 +    unsigned char exported_str[SIZEOF_BUF+1];
     1.9      unsigned char dom_id[5];
    1.10      unsigned long flags;
    1.11      int i=0;
    1.12 @@ -605,8 +605,8 @@ long do_console_write(char *str, unsigne
    1.13      
    1.14      spin_unlock_irqrestore(&console_lock, flags);
    1.15      
    1.16 -    exported_str[j]='\0';
    1.17 -    console_export(exported_str, j-1);
    1.18 +    exported_str[j++]='\0';
    1.19 +    console_export(exported_str, j);
    1.20      
    1.21      return(0);
    1.22  }