grub-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Don't pass filename in multiboot command line


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [RFC] Don't pass filename in multiboot command line
Date: Sat, 1 Aug 2009 17:13:27 +0200

On Sat, Aug 1, 2009 at 5:05 PM, Robert Millan<address@hidden> wrote:
> On Sat, Aug 01, 2009 at 04:37:40PM +0200, Vladimir 'phcoder' Serbinenko wrote:
>> > I agree with this.  But please wait a few days to give everyone a chance
>> > to read it.
>> >
>> > Regarding the patch:
>> >
>> > There's a much simpler way to address this.  Just add something like:
>> >
>> >  cmdline_argv = argv + 1;
>> >  cmdline_argc = argc - 1;
>> >
>> > at the beginning, and then use cmdline_argv and cmdline_argc instead of
>> > correcting the off-by-one every time.
>> Correcting the numbers is actually smaller part of the patch. The most
>> of it is to make empty commandlines to be handled correctly (this
>> couldn't happen previously)
>
> Either there's an extra argv member that is always present and we want
> to remove, or there's the possibility that the command-line is empty.
> AFAICS we can't have both problems.
>
No. Now we have an extra element that is always present and we want to
remove but when we remove command line can be empty and code must
handle it correctly.

> argv[0] corresponds to the filename, right?  In that case, it's not possible
> to run multiboot without argv[0] (or at least, we shouldn't allow it).  Then
> we can remove it unconditionally.
>
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git




reply via email to

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