Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH] create variables when exporting them
Date: Mon, 21 Dec 2009 15:21:37 +0100	[thread overview]
Message-ID: <4B2F8471.6080801@gmail.com> (raw)
In-Reply-To: <4B27D378.1080805@googlemail.com>

[-- Attachment #1: Type: text/plain, Size: 2388 bytes --]

Andreas Born wrote:
> I just noticed that I forgot the header line of the diff. Sorry for that.
> New double checked version attached.
>
Applied with stylistic fixes
> The Changelog is still:
> 2009-12-15 Andreas Born  <futur.andy@googlemail.com>
>
>      * kern/env.c (grub_env_export): Create nonexistent variables
> before exporting.
>
> Andreas Born schrieb:
>> Same here. Nothing changed as of r1917 and I didn't get any further
>> feedback either.
>> I've attached a rediffed version, too.
>>
>> Andreas Born schrieb:
>>> Here you go:
>>> ChangeLog:
>>> 2009-10-15  Andreas Born  <futur.andy@googlemail.com>
>>>
>>>       * kern/env.c (grub_env_export): Create nonexistent variables
>>> before exporting.
>>>
>>>
>>> The mixed indentation (tabs and spaces) in kern/env.c was a bit
>>> confusing.
>>>
>>> Andreas
>>>
>>> Colin Watson schrieb:
>>>> On Thu, Oct 15, 2009 at 08:40:37PM +0200, Andreas Born wrote:
>>>>  
>>>>> This patch changes grub_env_export to create variables with empty
>>>>> value,  if necessary.
>>>>> This makes it possible to export variables before actually
>>>>> assigning  them any value and is the way bash behaves.
>>>>>     
>>>>
>>>> This makes sense to me (although bash is "too big and too slow" and
>>>> we'll never implement anything close to all of it, this is a pretty
>>>> cheap way to reduce confusion due to differences), although
>>>> probably for
>>>> post-1.97. A couple of nits:
>>>>
>>>>  
>>>>>        * kern/env.c (grub_env_export): Create inexistent
>>>>> variables  before exporting.
>>>>>     
>>>>
>>>> "nonexistent"
>>>>
>>>>  
>>>>> +  if (! var)
>>>>> +  {
>>>>> +    if (grub_env_set (name, "") != GRUB_ERR_NONE)
>>>>> +        return grub_errno;
>>>>> +    var = grub_env_find (name);
>>>>> +  }        
>>>>
>>>> GNU brace style involves indenting the braces as well, thus:
>>>>
>>>>   if (! var)
>>>>     {
>>>>       if (grub_env_set (name, "") != GRUB_ERR_NONE)
>>>>           return grub_errno;
>>>>       var = grub_env_find (name);
>>>>     }     
>>>
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

      reply	other threads:[~2009-12-21 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15 18:40 [PATCH] create variables when exporting them Andreas Born
2009-10-15 19:16 ` Colin Watson
2009-10-15 19:52   ` Andreas Born
2009-12-06 22:57     ` Andreas Born
2009-12-15 18:20       ` Andreas Born
2009-12-21 14:21         ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]

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=4B2F8471.6080801@gmail.com \
    --to=phcoder@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox