* read_config_file() is missleading
@ 2008-02-01 19:58 Robert Millan
2008-02-02 12:14 ` Yoshinori K. Okuji
0 siblings, 1 reply; 4+ messages in thread
From: Robert Millan @ 2008-02-01 19:58 UTC (permalink / raw)
To: grub-devel
The following function name:
normal/main.c:read_config_file (const char *config, int nested)
is missleading. It does actually execute the config file, not just
read it. Does it seem fine to rename it?
How about `process_config_file' ?
Or maybe I am missing something.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read_config_file() is missleading
2008-02-01 19:58 read_config_file() is missleading Robert Millan
@ 2008-02-02 12:14 ` Yoshinori K. Okuji
2008-02-02 12:20 ` Yoshinori K. Okuji
0 siblings, 1 reply; 4+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-02 12:14 UTC (permalink / raw)
To: The development of GRUB 2
On Friday 01 February 2008 20:58, Robert Millan wrote:
> The following function name:
>
> normal/main.c:read_config_file (const char *config, int nested)
>
> is missleading. It does actually execute the config file, not just
> read it. Does it seem fine to rename it?
>
> How about `process_config_file' ?
>
> Or maybe I am missing something.
I think the initial idea was that read_config_file would only read a file,
then a menu would be executed by another function. But it is not for some
reason. I forget why. Maybe it didn't make sense to separate the
functionality into two functions. I am not sure.
If you can think of any reason that we should separate the functionality, you
can make process_config or something like that. Otherwise, it is fine for me
to rename the function.
Okuji
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read_config_file() is missleading
2008-02-02 12:14 ` Yoshinori K. Okuji
@ 2008-02-02 12:20 ` Yoshinori K. Okuji
2008-02-02 16:37 ` Robert Millan
0 siblings, 1 reply; 4+ messages in thread
From: Yoshinori K. Okuji @ 2008-02-02 12:20 UTC (permalink / raw)
To: The development of GRUB 2
On Saturday 02 February 2008 13:14, Yoshinori K. Okuji wrote:
> On Friday 01 February 2008 20:58, Robert Millan wrote:
> > The following function name:
> >
> > normal/main.c:read_config_file (const char *config, int nested)
> >
> > is missleading. It does actually execute the config file, not just
> > read it. Does it seem fine to rename it?
> >
> > How about `process_config_file' ?
> >
> > Or maybe I am missing something.
>
> I think the initial idea was that read_config_file would only read a file,
> then a menu would be executed by another function. But it is not for some
> reason. I forget why. Maybe it didn't make sense to separate the
> functionality into two functions. I am not sure.
>
> If you can think of any reason that we should separate the functionality,
> you can make process_config or something like that. Otherwise, it is fine
> for me to rename the function.
I was mistaken. It really depends on the meaning of "execute". For me,
executing a menu means analyzing the menu structure, displaying it,
controlling user inputs, and so on. read_menu_config does not execute a menu
in this sense.
But, of course, it executes commands in a config file.
Okuji
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: read_config_file() is missleading
2008-02-02 12:20 ` Yoshinori K. Okuji
@ 2008-02-02 16:37 ` Robert Millan
0 siblings, 0 replies; 4+ messages in thread
From: Robert Millan @ 2008-02-02 16:37 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Feb 02, 2008 at 01:20:04PM +0100, Yoshinori K. Okuji wrote:
>
> I was mistaken. It really depends on the meaning of "execute". For me,
> executing a menu means analyzing the menu structure, displaying it,
> controlling user inputs, and so on. read_menu_config does not execute a menu
> in this sense.
>
> But, of course, it executes commands in a config file.
Still, "read" is missleading, as it does more than reading. If you add
"echo foo" to grub.cfg, this function will print "foo".
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-02-02 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-01 19:58 read_config_file() is missleading Robert Millan
2008-02-02 12:14 ` Yoshinori K. Okuji
2008-02-02 12:20 ` Yoshinori K. Okuji
2008-02-02 16:37 ` Robert Millan
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.