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: Robert Millan
Subject: Re: [RFC] Don't pass filename in multiboot command line
Date: Sat, 1 Aug 2009 17:05:29 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

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.

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."




reply via email to

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