Commit 7ba1260ac1637f5d9e3af619e74de3cb39f10ba6

Authored by bellard
1 parent bd468840

generate CRLF instead of LF


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2055 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 5 additions and 3 deletions
monitor.c
... ... @@ -82,8 +82,10 @@ void term_puts(const char *str)
82 82 c = *str++;
83 83 if (c == '\0')
84 84 break;
  85 + if (c == '\n')
  86 + term_outbuf[term_outbuf_index++] = '\r';
85 87 term_outbuf[term_outbuf_index++] = c;
86   - if (term_outbuf_index >= sizeof(term_outbuf) ||
  88 + if (term_outbuf_index >= (sizeof(term_outbuf) - 1) ||
87 89 c == '\n')
88 90 term_flush();
89 91 }
... ...
... ... @@ -6159,7 +6159,7 @@ int main(int argc, char **argv)
6159 6159 exit(1);
6160 6160 }
6161 6161 if (!strcmp(serial_devices[i], "vc"))
6162   - qemu_chr_printf(serial_hds[i], "serial%d console\n", i);
  6162 + qemu_chr_printf(serial_hds[i], "serial%d console\r\n", i);
6163 6163 }
6164 6164 }
6165 6165  
... ... @@ -6172,7 +6172,7 @@ int main(int argc, char **argv)
6172 6172 exit(1);
6173 6173 }
6174 6174 if (!strcmp(parallel_devices[i], "vc"))
6175   - qemu_chr_printf(parallel_hds[i], "parallel%d console\n", i);
  6175 + qemu_chr_printf(parallel_hds[i], "parallel%d console\r\n", i);
6176 6176 }
6177 6177 }
6178 6178  
... ...