[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device
From: |
Fajar A. Nugraha |
Subject: |
Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device |
Date: |
Fri, 27 Feb 2015 19:04:09 +0700 |
On Fri, Feb 27, 2015 at 6:56 PM, Vladimir 'φ-coder/phcoder' Serbinenko
<address@hidden> wrote:
> On 27.02.2015 12:47, Fajar A. Nugraha wrote:
>>
>> + lua_pushstring (state, label);
>
> What happens if label is NULL?
On my test it doesn't throw any errors.
Note that the new code was mostly copy-paste from the original fs->uuid code
###
if (! fs->uuid)
lua_pushnil (state);
else
{
...
###
New code on my patch:
###
+ if (! fs->label)
+ lua_pushnil (state);
+ else
+ {
...
###
so if label is NULL then it should not reach lua_pushstring (state,
label), but rather run lua_pushnil (state).
--
Fajar
- [PATCH] grub-extras/lua: add fs label to grub.enum_device, Fajar A. Nugraha, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device,
Fajar A. Nugraha <=
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Andrei Borzenkov, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Fajar A. Nugraha, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Vladimir 'phcoder' Serbinenko, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Fajar A. Nugraha, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Vladimir 'phcoder' Serbinenko, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Andrei Borzenkov, 2015/02/27
- Re: [PATCH] grub-extras/lua: add fs label to grub.enum_device, Vladimir 'φ-coder/phcoder' Serbinenko, 2015/02/27