Re: grub_prefix

2007-06-12 Thread Bean
On Tue, Jun 12, 2007 at 03:54:12PM +0200, Robert Millan wrote: > > Is there any reason why grub_prefix is in boot.img rather than core.img ? > > This brings problems when the following conditions are met: > > - core.img is loaded directly without boot.img (via GRUB Legacy) > - grub is not in

Re: Checking parametres that are not inside an option

2007-06-12 Thread Marco Gerards
adrian15 <[EMAIL PROTECTED]> writes: > If you take a look at search.c you can see that the -s parametrer is > checked outside the command thanks to the ARG_TYPE_STRING constant. > > {"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first > device found", "VAR", ARG_TYPE_STRING} > > > I

Re: How to call a command from another one

2007-06-12 Thread Marco Gerards
adrian15 <[EMAIL PROTECTED]> writes: > Robert Millan escribió: >> On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote: >>> Hi, >>> >>> I want to implement the pause command so that it is the same thing as >>> the echo command with all of its options and also that it stops. >> I don't know

NTFS file system driver (update 2)

2007-06-12 Thread Bean
Changelog for this update: * Include Robert Millan's patch * Handle a rare situation where $BITMAP attribute is non-resident * Misc fixes -- Bean <[EMAIL PROTECTED]> 2007-06-12 Bean <[EMAIL PROTECTED]> * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod. * conf/powerpc-ieee1275

Re: Pager does work from a menu?

2007-06-12 Thread adrian15
Robert Millan escribió: On Tue, Jun 12, 2007 at 01:57:42PM +0200, adrian15 wrote: This code from: normal/command.c /* Enable the pager if the environment pager is set to 1. */ if (interactive) pager = grub_env_get ("pager"); else pager = 0; if (pager && (! grub_strcmp (pager, "

Re: How to call a command from another one

2007-06-12 Thread adrian15
Robert Millan escribió: On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote: Hi, I want to implement the pause command so that it is the same thing as the echo command with all of its options and also that it stops. I don't know how to call other commands, but in this case, maybe

Re: how to add a new command

2007-06-12 Thread adrian15
Robert Millan escribió: Look at how other commands are hooked in. rgrep(1) is your friend :-) I already did that and it seemed to me to complicated to add a simple command compared to grub legacy. That's why I asked, I'll try with Alex Roman suggestion. adrian15 _

Vim rules for editing GRUB 2

2007-06-12 Thread Alex Roman
Does anyone have some vim rules for editing on GRUB 2? I've noticed some files use both tabs and spaces for indentation, so I'm not sure which to use to please everyone (or most people?)... Also how many spaces should be used for indentation? Thanks in advance! -- Alex Roman <[EMAIL PROTECTED]>

Re: Pager does work from a menu?

2007-06-12 Thread Robert Millan
On Tue, Jun 12, 2007 at 01:57:42PM +0200, adrian15 wrote: > This code from: normal/command.c > > /* Enable the pager if the environment pager is set to 1. */ > if (interactive) > pager = grub_env_get ("pager"); > else > pager = 0; > if (pager && (! grub_strcmp (pager, "1"))) >

Re: how to add a new command

2007-06-12 Thread Alex Roman
On 12/06/07, adrian15 <[EMAIL PROTECTED]> wrote: Once I write a new command like map.c or pause.c how am I supposed to add it to the standard grub? Should I write the makefiles manually?! or should I use some of the .sh files at the grub2 source code root folder? I've been editi

Re: How to call a command from another one

2007-06-12 Thread Robert Millan
On Tue, Jun 12, 2007 at 01:57:11PM +0200, adrian15 wrote: > Hi, > > I want to implement the pause command so that it is the same thing as > the echo command with all of its options and also that it stops. > > My first approach which I could not compile because I do not how to >

Re: how to add a new command

2007-06-12 Thread Robert Millan
On Tue, Jun 12, 2007 at 01:56:52PM +0200, adrian15 wrote: > Once I write a new command like map.c or pause.c how am I supposed to > add it to the standard grub? > Should I write the makefiles manually?! or should I use some of the > .sh > files at the grub2 source code root folde

Re: Some comments on grub2 on gutsy

2007-06-12 Thread Robert Millan
On Tue, Jun 12, 2007 at 11:14:33PM +1200, Centurion Computer Technology (2005) Ltd wrote: > On Mon, 2007-06-11 at 20:13 +0200, Robert Millan wrote: > > > On the GRUB menu apart from the regular entries there is also a > > > chainload to GRUB 2. When I enter that I get a menu similar to GRUB > > >

grub_prefix

2007-06-12 Thread Robert Millan
Is there any reason why grub_prefix is in boot.img rather than core.img ? This brings problems when the following conditions are met: - core.img is loaded directly without boot.img (via GRUB Legacy) - grub is not in /boot/grub (typicaly, when /boot is a separate partition) If grub_prefix is

How to call a command from another one

2007-06-12 Thread adrian15
Hi, I want to implement the pause command so that it is the same thing as the echo command with all of its options and also that it stops. My first approach which I could not compile because I do not how to add a new command to grub2 is the following one: char key; if (argc

Checking parametres that are not inside an option

2007-06-12 Thread adrian15
If you take a look at search.c you can see that the -s parametrer is checked outside the command thanks to the ARG_TYPE_STRING constant. {"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first device found", "VAR", ARG_TYPE_STRING} If I want not to check if an argument command that

Pager does work from a menu?

2007-06-12 Thread adrian15
This code from: normal/command.c /* Enable the pager if the environment pager is set to 1. */ if (interactive) pager = grub_env_get ("pager"); else pager = 0; if (pager && (! grub_strcmp (pager, "1"))) grub_set_more (1); Can anyone confirm my suspictions that even the pager

how to add a new command

2007-06-12 Thread adrian15
Once I write a new command like map.c or pause.c how am I supposed to add it to the standard grub? Should I write the makefiles manually?! or should I use some of the .sh files at the grub2 source code root folder? adrian15 ___ Grub-

Variables help inside a command help

2007-06-12 Thread adrian15
If you check the man pages of some linux commands you will see that there is a place where it talks about ENVIRONMENT VARIABLES or something similar where it describes some variables than can modify the way a command works. As long as we can "register" the options help like this:

Re: Some comments on grub2 on gutsy

2007-06-12 Thread Arthur Marsh
Centurion Computer Technology (2005) Ltd wrote, on 2007-06-12 20:44: On Mon, 2007-06-11 at 20:13 +0200, Robert Millan wrote: On the GRUB menu apart from the regular entries there is also a chainload to GRUB 2. When I enter that I get a menu similar to GRUB menu but without any entries. Dunno why

Re: Some comments on grub2 on gutsy

2007-06-12 Thread Centurion Computer Technology (2005) Ltd
On Mon, 2007-06-11 at 20:13 +0200, Robert Millan wrote: > > On the GRUB menu apart from the regular entries there is also a > > chainload to GRUB 2. When I enter that I get a menu similar to GRUB > > menu but without any entries. Dunno why it is there, can anybody > > explain ? > > > > This is jus