* grub variables semi support on grub legacy
@ 2005-12-13 11:36 adrian15
2005-12-13 12:12 ` Marco Gerards
0 siblings, 1 reply; 2+ messages in thread
From: adrian15 @ 2005-12-13 11:36 UTC (permalink / raw)
To: grub-devel
I recently sent an email to http://lists.gnu.org/archive/html/bug-
grub/2005-12/msg00023.html and nobody answered me.
So... I will continue this message here... because there are some grub
legacy developers round here or at least I hope so.
I've already begun on implementing variables support on grub legacy. (Sorry
code is at home). I've added to share.h (
http://cvs.savannah.gnu.org/viewcvs/grub/grub/stage2/shared.h?rev=1.99
&view=auto ) some BUF and LEN variables to store var1, var2 and var3.
I've define and initialized variables on cmain() of stage2.c (
http://cvs.savannah.gnu.org/viewcvs/grub/grub/stage2/stage2.c?rev=1.46
&view=auto) so that every variable has it's first character to 0 (or \0 if
you prefer).
And then I modify the variables in builtins.c with two new commands:
echov N: Shows the contents of a variable.
set N contents: Sets contents of a variable to contents.
N is a number between 1 and 3.
And both commands work.
I want to add more variables by using a function that receives a pointer to
char... and returns a pointer to char. So that if I read 1 it returns the
pointer to var+(VAR_SIZE*(1-1)) and if I read 2 it returns pointer to
var+(VAR_SIZE*(2-1)) and so on... so that I do not have to define var1,
var2, var3 but var where variables buffer begins.
If you have better ideas of implement it or whatever you just say them.
In the following weekends I'll try to implement addv to add a variable
contents to another one. And adds to add an string to another variable.
And what I wanted to ask about the run command which I think I will
implement it (For the sake of simplicity) with "run N" ... where N is a
variable... and variable can have "configfile (hd0,1)/grub/menu.lst) as
contents.
Well, waiting for comments. Can I add the variables that I want, with the
size (300 currently) that I want or is there a limit size somewhere ?
adrian15
P.D. Can anyone explain
#define MENU_BUFLEN (0x8000 + PASSWORD_BUF - MENU_BUF)
this line of shared.h...
Isn't it supposed to be PASSWORD_BUF lesser than MENU_BUF...?
Why's this MENU_BUFLEN defined this way?
P.D.: I also want to implement a "call" command which loads a configfile
let's you select you one option and then configfiles the previous menu. But
that's another tale.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: grub variables semi support on grub legacy
2005-12-13 11:36 grub variables semi support on grub legacy adrian15
@ 2005-12-13 12:12 ` Marco Gerards
0 siblings, 0 replies; 2+ messages in thread
From: Marco Gerards @ 2005-12-13 12:12 UTC (permalink / raw)
To: The development of GRUB 2
"adrian15" <adrian15@raulete.net> writes:
> I recently sent an email to http://lists.gnu.org/archive/html/bug-
> grub/2005-12/msg00023.html and nobody answered me.
>
> So... I will continue this message here... because there are some grub
> legacy developers round here or at least I hope so.
As someone told you before, this list is about the development of GRUB
2. Please do not ask questions about GRUB Legacy here. Most people
here only work on GRUB 2 and if the people who know about GRUB Legacy
didn't reply on bug-grub, that sucks, but we can't help it.
Hopefully I don't sound too harsh, I don't intent to. But it is a bit
annoying to see GRUB Legacy questions all the time. I often read this
list because I work actively on GRUB 2, while I choose to ignore some
other lists some times.
--
Marco
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-13 12:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-13 11:36 grub variables semi support on grub legacy adrian15
2005-12-13 12:12 ` Marco Gerards
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.