grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Handler support


From: Vesa Jääskeläinen
Subject: Re: [PATCH] Handler support
Date: Sun, 15 Feb 2009 09:32:34 +0200
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Bean wrote:
> On Sat, Feb 14, 2009 at 11:11 PM, Felix Zielcke <address@hidden> wrote:
>>     A. Am Samstag, den 14.02.2009, 22:46 +0800 schrieb Bean:
>>
>>> If there is no objection, I'd commit this patch in a few days.
>> Hello Bean,
>>
>> if you want to drop termin_input and terminal_output command then please
>> don't forget to update util/grub.d/00_header.in
>>
>> +GRUB_MOD_INIT(handler)
>> +{
>> +  (void)mod;                   /* To stop warning. */
>> +  grub_register_command ("handler", grub_cmd_handler,
>> GRUB_COMMAND_FLAG_BOTH,
>> +                        "handler [class [handler]]",
>> +                        "List or select a handler", 0);
>> +}
>> +
>> +GRUB_MOD_FINI(handler)
>> +{
>> +  grub_unregister_command ("hello");
>> +}
>>
>> This should probable be grub_unregister_command ("handler").
> 
> Hi,
> 
> Thanks for pointing out, this new patch should fix the problem.

Hi,

Ok. I a way this functionality could be used. I just don't like how it
is visible to the user.

> +if handler output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
> +  # For backward compatibility with versions that uses terminal.mod instead
> +  # of handler.mod
> +  if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
> +    # For backward compatibility with versions of terminal.mod that don't
> +    # understand terminal_output
> +    terminal ${GRUB_TERMINAL_OUTPUT}
> +  fi

If we look at this snippet, for me keyword handler doesn't say a thing.
where it could be terminal for terminal handlers.

So I would propose to change it in following ways:

1. Do not register handler command unless you need to enumerate those or
allow more flexibility to configuration
2. Register command functions/alias to more understandable grub commands.

So following could be:

terminal output <whatever>

or keep it what it is (I would prefer above line)

terminal_output

Good idea with this handler stuff would be that if someone writes following:

terminal console

It would lookup if this console provides input and output service and
would use them out of the box.

Now if some-one writes something like:

terminal --input usbkbd --input console --output console

or:

terminal --input usbkbd
terminal --input console
terminal --output console

or

terminal_input usbkbd
terminal_input console
terminal_output console

or

terminal_input usbkbd console
terminal_output console

or

terminal_input console
terminal_output console
termianl_input --add usbkbd

User would now get two input sources like ps2 keyboard and usb keyboard
and then output to console.

Anyway... my point being... handler does not say anything to me in a
sens what does it logically give to user. It hinders the understanding
of the user for grub 2 usage...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]