All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <metgerards@student.han.nl>
To: Vladimir Serbinenko <phcoder@gmail.com>
Cc: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Scripting support (PATCH)
Date: Sun, 30 Oct 2005 17:59:34 +0100	[thread overview]
Message-ID: <87d5lngcuh.fsf@student.han.nl> (raw)
In-Reply-To: <4364F8F9.9080407@gmail.com> (Vladimir Serbinenko's message of "Sun, 30 Oct 2005 17:46:49 +0100")

Vladimir Serbinenko <phcoder@gmail.com> writes:

>>I think you have to parse it immediately and both store parsed and the
>>unparsed code.  After editing you do the same again.
>>
> I see 2 approaches:
> 1) Parse menu commands right before executing
> 2) Parse them directly and reparse after editing.
> I think 1st one is cleaner because the parser will be at the same
> place after editing or before

Same for #2.  And #2 matches the rest of the code.  Otherwise you are
parsing the code twice.  One when reading it and once when executing
it.  The code is already parsed by bison.  If you ignore the result of
this parsing you are causing a memory leak and wasting processor
time.  It is done already so why not use it? :)

So the problem with approach #1 is doing double work, less obvious
integration with the rest of the parser and memory leakage.

>>This solution is required if you want to be able to edit the complete
>>script instead of just the separate menu entries.  I think this is not
>>interesting, but if someone wants to know I can say more about this.
>>
>>
> I think also. Because theese modifications are lost after boot they
> are generally modified only to boot one time an OS with specifical
> parameters and you don't need scripts for this.

Right.  The only reason I see for editing the script in general is to
edit some menu generation routine.  But that is a very rare case I
think.  If it turns out not to be a rare case, we can provide this
feature later on.

--
Marco




  reply	other threads:[~2005-10-30 16:59 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29 21:41 Scripting support (PATCH) Marco Gerards
2005-10-30  5:25 ` Yoshinori K. Okuji
2005-10-30  9:45   ` Marco Gerards
2005-10-30 11:55     ` Yoshinori K. Okuji
2005-10-30 12:17       ` Marco Gerards
2005-10-30 10:14   ` Marco Gerards
2005-10-30 14:41 ` Vladimir Serbinenko
2005-10-30 16:05   ` Marco Gerards
2005-10-30 16:46     ` Vladimir Serbinenko
2005-10-30 16:59       ` Marco Gerards [this message]
2005-10-30 17:15         ` Vladimir Serbinenko
2005-10-30 18:17           ` Marco Gerards
2005-10-31  6:39   ` Yoshinori K. Okuji
2005-10-30 20:49 ` Hollis Blanchard
2005-10-30 21:04   ` Marco Gerards
2005-10-31  6:45     ` Yoshinori K. Okuji
2005-10-31 18:58       ` Marco Gerards
2005-11-01 19:06         ` Marco Gerards
2005-11-01 19:55           ` Yoshinori K. Okuji
2005-11-03 21:58 ` Marco Gerards
2005-11-06 22:26   ` Marco Gerards
2005-11-08  3:38     ` Hollis Blanchard
2005-11-08 18:24       ` Marco Gerards
2005-11-09  6:14         ` Hollis Blanchard
     [not found] <200511010611.jA16B6Bq030884@dell01.dinaserver.com>
2005-11-02  9:37 ` adrian15
2005-11-06 22:13   ` Marco Gerards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d5lngcuh.fsf@student.han.nl \
    --to=metgerards@student.han.nl \
    --cc=grub-devel@gnu.org \
    --cc=phcoder@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.