grub-devel
[Top][All Lists]
Advanced

[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



reply via email to

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