Hello. If syntax error in menu entry occurs it oftens results in the
menu cut after first line. Here is the fix

-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
diff --git a/ChangeLog b/ChangeLog
index a0780ab..8824f1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-23  Vladimir Serbinenko  <phco...@gmail.com>
+
+       * kern/parser.c (grub_parser_execute): Fix a bug causing truncated
+       entries on failed boot.
+
 2009-07-21  Vladimir Serbinenko  <phco...@gmail.com>
 
        UUID support for UFS
diff --git a/kern/parser.c b/kern/parser.c
index 5e56ede..db59af0 100644
--- a/kern/parser.c
+++ b/kern/parser.c
@@ -245,10 +245,12 @@ grub_parser_execute (char *source)
 
       p = grub_strchr (source, '\n');
       if (p)
-       *(p++) = 0;
+       *p = 0;
 
       *line = grub_strdup (source);
-      source = p;
+      if (p)
+       *p = '\n';
+      source = p ? p + 1 : 0;
       return 0;
     }
 
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to