Le 2015-02-27 13:48, "Fajar A. Nugraha" <l...@fajar.net> a écrit :
>
> On Fri, Feb 27, 2015 at 7:42 PM, Vladimir 'phcoder' Serbinenko
> <phco...@gmail.com> wrote:
> >
> > Le 2015-02-27 13:40, "Fajar A. Nugraha" <l...@fajar.net> a écrit :
> >
> >
> >>
> >> On Fri, Feb 27, 2015 at 7:28 PM, Vladimir 'φ-coder/phcoder' Serbinenko
> >> <phco...@gmail.com> wrote:
> >> > On 27.02.2015 13:06, Andrei Borzenkov wrote:
> >> >>
> >> >> On Fri, Feb 27, 2015 at 2:56 PM, Vladimir 'φ-coder/phcoder'
Serbinenko
> >> >> <phco...@gmail.com> wrote:
> >> >>>
> >> >>> On 27.02.2015 12:47, Fajar A. Nugraha wrote:
> >> >>>>
> >> >>>>
> >> >>>> +  lua_pushstring (state, label);
> >> >>>
> >> >>>
> >> >>> What happens if label is NULL?
> >> >>>
> >> >>
> >> >> In all cases if grub could mount filesystem it returns
strdup(label).
> >> >> Is it possible that mount fails without setting grub_errno? If yes,
it
> >> >> is probably a bug.
> >> >>
> >> > Nope. If filesystem has no label (rather than just empty label), it
will
> >> > have *label == NULL and return no error which is correct. Same for
UUID.
> >> > So
> >> > unless lua_pushstring has special handling for NULL, this code needs
to
> >> > be
> >> > fixed.
> >>
> >>
> >> Doesn't
> >>
> >> if (! fs->label)
> >>     lua_pushnil (state);
> >>
> >> do the correct handling? Or is there something I missed, and NULL does
> >> not always evaluate to FALSE?
> >>
> > I was speaking of label, not fs->label
>
>
> Ah, OK.
>
> In that case, won't fs->label be FALSE, and *label (in grub_lib.c,
> please correct me if you mean *label in other parts of grub) would
> never be defined, and  lua_pushstring(state, label) will never get
> called?
>
fs->label only checks for function availability
> --
> Fajar
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to