All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] Parse commandline in grub-xen
Date: Mon, 11 May 2015 14:15:54 +0200	[thread overview]
Message-ID: <20150511121554.GA3180@aepfle.de> (raw)
In-Reply-To: <20150511150339.3f303f6a@opensuse.site>

On Mon, May 11, Andrei Borzenkov wrote:

> Either by allowing ${grub.arg.XXX} (not sure if current grammar accepts
> it) or by adding getarg command, something like
> 
> getarg --name debug --set debug

What would such format buy us?

> You do not control what arguments grub gets - end use (admin) controls
> it. You cannot force end user to actually strictly comply with what you
> expect. As example, grub.cfg you recently submitted has
> 
> if [ -n "hddev" ]
> 
> without initializing it first. So administrator setting this variable
> will unintentionally change behavior of script.

That should have been hdcfg of hddev, thanks for spotting it.

The use of uninitialized vars has to be caught by the script author no?
Code like that is valid IMO:

set localvar=""
if [ -n "${whatever}" ];then
  echo "do whatever implies"
  set localvar="val"
fi
if [ -n "${localvar}" ];then
  echo "do whatever local things"
fi


Olaf


  reply	other threads:[~2015-05-11 12:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11  9:28 [PATCH] Parse commandline in grub-xen Olaf Hering
2015-05-11  9:33 ` Vladimir 'phcoder' Serbinenko
2015-05-11  9:43   ` Olaf Hering
2015-05-11 10:29     ` Andrei Borzenkov
2015-05-11 10:41       ` Olaf Hering
2015-05-11 10:48         ` Vladimir 'phcoder' Serbinenko
2015-05-11 11:01           ` Olaf Hering
2015-05-11 11:24             ` Vladimir 'phcoder' Serbinenko
2015-05-11 11:51               ` Olaf Hering
2015-05-11 12:02                 ` Vladimir 'phcoder' Serbinenko
2015-05-11 12:06                   ` Olaf Hering
2015-05-11 12:03                 ` Andrei Borzenkov
2015-05-11 12:15                   ` Olaf Hering [this message]
2015-05-11 12:53                     ` Vladimir 'phcoder' Serbinenko
2015-05-11 13:34                       ` Olaf Hering
2015-05-11 13:43                         ` Vladimir 'phcoder' Serbinenko
2015-05-11 16:53                     ` Andrei Borzenkov
2015-05-11 17:08                       ` Olaf Hering
2015-05-11 17:12                         ` Vladimir 'phcoder' Serbinenko
2015-05-12  8:06                           ` Olaf Hering
2015-05-12  8:48                             ` Vladimir 'phcoder' Serbinenko
2015-05-12  9:09                               ` Olaf Hering
2015-05-12  9:42                                 ` Vladimir 'phcoder' Serbinenko
2015-05-11 12:55                   ` Vladimir 'phcoder' Serbinenko
2015-05-11 16:52                     ` Andrei Borzenkov
     [not found]                       ` <CAEaD8JOJw7sGD2SHdnnsWR8FFExesfg-892ZjxwPPqVMNCqMfg@mail.gmail.com>
2015-05-11 18:45                         ` Andrei Borzenkov
2015-05-11 18:49                           ` Vladimir 'phcoder' Serbinenko
2015-05-11 12:01             ` Michael Chang
2015-05-12  4:16               ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150511121554.GA3180@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.