* script bug
@ 2006-05-07 5:42 Yoshinori K. Okuji
2006-05-07 11:40 ` Marco Gerards
0 siblings, 1 reply; 3+ messages in thread
From: Yoshinori K. Okuji @ 2006-05-07 5:42 UTC (permalink / raw)
To: grub-devel
Try something like this:
@ "extremely long long
line............................................................." {
}
grub-emu segfaults. This is partially because of the menu code, partilaly
because of the scripting engine code. The menu code currently limits the max
number of characters per line to 100 (very bad). So get_line chops the line,
then the scripting engine cannot deal with the malformed line. Both must be
fixed.
Okuji
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: script bug
2006-05-07 5:42 script bug Yoshinori K. Okuji
@ 2006-05-07 11:40 ` Marco Gerards
2006-05-07 14:58 ` Yoshinori K. Okuji
0 siblings, 1 reply; 3+ messages in thread
From: Marco Gerards @ 2006-05-07 11:40 UTC (permalink / raw)
To: The development of GRUB 2
"Yoshinori K. Okuji" <okuji@enbug.org> writes:
> Try something like this:
>
> @ "extremely long long
> line............................................................." {
> }
>
> grub-emu segfaults. This is partially because of the menu code, partilaly
> because of the scripting engine code. The menu code currently limits the max
> number of characters per line to 100 (very bad). So get_line chops the line,
> then the scripting engine cannot deal with the malformed line. Both must be
> fixed.
Yeah, the get_line was broken from the beginning... I think it should
be even possible to remove this function because we do not really need
it.
As for scripting, I will test it in about two weeks. At the moment I
have very little time. :-/
--
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: script bug
2006-05-07 11:40 ` Marco Gerards
@ 2006-05-07 14:58 ` Yoshinori K. Okuji
0 siblings, 0 replies; 3+ messages in thread
From: Yoshinori K. Okuji @ 2006-05-07 14:58 UTC (permalink / raw)
To: The development of GRUB 2
On Sunday 07 May 2006 13:40, Marco Gerards wrote:
> Yeah, the get_line was broken from the beginning... I think it should
> be even possible to remove this function because we do not really need
> it.
I believe that get_line should be kept. Suppose that you have this kind of
config file:
1: do something
2: do another thing
3: do yet another thing
To execute these lines, it is not necessary to keep all the three lines in
memory, since they can be executed line by line. You can say that the
consumed memory is not that much, but I don't think this is a good way of
programming. Whenever possible, I think it is better to save memory.
BTW, could you describe how the scripting engine is supposed to work? For
example, suppose that you have this (the syntax is not very important here):
if test -f /boot/kernel; then
kernel /boot/kernel
fi
Is it possible to tell a line at a time to the scripting engine, and let it
execute this code block once "fi" is inputted? BASH deals with command lines
in this way.
Okuji
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-07 14:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-07 5:42 script bug Yoshinori K. Okuji
2006-05-07 11:40 ` Marco Gerards
2006-05-07 14:58 ` Yoshinori K. Okuji
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.