[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [mini-os master] mini-os: Remove \r\n conversion when writing to PV serial port
commit 88c9b4357e5e7a2f3d7b7821a64a4454061631ed Author: Simon Waterman <watermansrdev@xxxxxxxxx> AuthorDate: Wed May 10 23:33:23 2017 +0100 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Thu May 11 15:19:54 2017 +0100 mini-os: Remove \r\n conversion when writing to PV serial port This change removes \n to \r\n conversion when writing to a PV serial port so that binary protocols carried over the port are not corrupted. The change enables new use-cases for example connectivity from the Windows Kernel Debugger to a guest via it's IOEMU stubdom. Signed-off-by: Simon Waterman <watermansrdev@xxxxxxxxx> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx> Acked-by: Keir Fraser <keir@xxxxxxx> --- console/console.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/console/console.c b/console/console.c index 5538bd4..de94ad6 100644 --- a/console/console.c +++ b/console/console.c @@ -82,10 +82,6 @@ void xencons_tx(void) void console_print(struct consfront_dev *dev, char *data, int length) { - char *curr_char, saved_char; - char copied_str[length+1]; - char *copied_ptr; - int part_len; int (*ring_send_fn)(struct consfront_dev *dev, const char *data, unsigned length); if(!console_initialised) @@ -93,30 +89,7 @@ void console_print(struct consfront_dev *dev, char *data, int length) else ring_send_fn = xencons_ring_send; - copied_ptr = copied_str; - memcpy(copied_ptr, data, length); - for(curr_char = copied_ptr; curr_char < copied_ptr+length-1; curr_char++) - { - if(*curr_char == '\n') - { - *curr_char = '\r'; - saved_char = *(curr_char+1); - *(curr_char+1) = '\n'; - part_len = curr_char - copied_ptr + 2; - ring_send_fn(dev, copied_ptr, part_len); - *(curr_char+1) = saved_char; - copied_ptr = curr_char+1; - length -= part_len - 1; - } - } - - if (copied_ptr[length-1] == '\n') { - copied_ptr[length-1] = '\r'; - copied_ptr[length] = '\n'; - length++; - } - - ring_send_fn(dev, copied_ptr, length); + ring_send_fn(dev, data, length); } void print(int direct, const char *fmt, va_list args) -- generated by git-patchbot for /home/xen/git/mini-os.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |