mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
* kern/parser.c (grub_parser_execute): Cope with read-only config.
This commit is contained in:
1 parent
6f8aaf68be
commit
3080f7a7bd
2 files changed
+8
-5
No files matched your search
+3
-4
@@ -249,12 +249,11 @@ grub_parser_execute (char *source)
|
||||
}
|
||||
|
||||
p = grub_strchr (source, '\n');
|
||||
if (p)
|
||||
*p = 0;
|
||||
|
||||
*line = grub_strdup (source);
|
||||
if (p)
|
||||
*p = '\n';
|
||||
*line = grub_strndup (source, p - source);
|
||||
else
|
||||
*line = grub_strdup (source);
|
||||
source = p ? p + 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user