Your message dated Sun, 20 Jun 2010 23:19:37 +0100
with message-id <[email protected]>
has caused the report #586358,
regarding grub-pc: Please handle DOS line endings in "cat"
to be marked as having been forwarded to the upstream software
author(s) [email protected]
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Re: Bug#586358: grub-pc: Please handle DOS line endings in "cat"
Sun, 20 Jun 2010 23:19:37 +0100
On Fri, Jun 18, 2010 at 11:34:08AM -0700, Josh Triplett wrote:
> The "cat" command, if given a file with DOS line endings, will show the
> \r at the end of every line as a control character. For convenience,
> please consider adding support for this in "cat", ideally automatically.
Makes sense to me. grub-devel, how about this patch?
2010-06-20 Colin Watson <[email protected]>
* commands/cat.c (grub_cmd_cat): Print DOS "\r\n" line endings as
=== modified file 'commands/cat.c'
--- commands/cat.c 2010-03-01 19:24:34 +0000
+++ commands/cat.c 2010-06-20 22:11:37 +0000
@@ -54,6 +54,11 @@ grub_cmd_cat (grub_command_t cmd __attri
if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
+ else if (c == '\r' && buf[i + 1] == '\n')
+ grub_putchar ('\n');
Colin Watson [[email protected]]
--- End Message ---