Here a small patch for a minor issue:
cat command does not work well for files including '\r' because the
previous line may be overwritten.
In grub-emu, files with cr/lf line endings are invisible due to ncurses
behavior.
Christian
2008-02-08 Christian Franke <[EMAIL PROTECTED]>
* commands/cat.c (grub_cmd_cat): Print '\r' as hex to
avoid overwriting previous output.
* kern/rescue.c (grub_rescue_cmd_cat): Likewise.
diff -rup grub2.orig/commands/cat.c grub2/commands/cat.c
--- grub2.orig/commands/cat.c 2007-07-22 01:32:19.000000000 +0200
+++ grub2/commands/cat.c 2007-11-02 21:24:33.375000000 +0100
@@ -50,7 +50,7 @@ grub_cmd_cat (struct grub_arg_list *stat
{
unsigned char c = buf[i];
- if (grub_isprint (c) || grub_isspace (c))
+ if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
grub_putchar (c);
else
{
diff -rup grub2.orig/kern/rescue.c grub2/kern/rescue.c
--- grub2.orig/kern/rescue.c 2008-02-03 20:29:52.968750000 +0100
+++ grub2/kern/rescue.c 2008-02-08 23:30:37.656250000 +0100
@@ -151,7 +151,7 @@ grub_rescue_cmd_cat (int argc, char *arg
{
unsigned char c = buf[i];
- if (grub_isprint (c) || grub_isspace (c))
+ if ((grub_isprint (c) || grub_isspace (c)) && c != '\r')
grub_putchar (c);
else
{
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel