On Di, 26.06.18 10:33, Peter Jones (pjones(a)redhat.com) wrote:
On Tue, Jun 26, 2018 at 03:46:59PM +0200, Javier Martinez Canillas
wrote:
> > That raises two questions:
> > 1. Why isn't just the bls-snippet filename used as the key? It's
> > necessarily unique and should be usable for the purpose of uniquely
> > identifying the boot entry without creating a separate field.
>
> I'll let Peter answer this question since he wrote the grub2
> implementation. Doing this will be pretty trivial, but in that case we
> should also sort using the filenames if the id field isn't defined.
I don't know that I have a specific reason in mind when I wrote that bit
of code. Most likely the real answer is: because when I realized we
have to sort them, I was writing parser code not directory iterating
code.
In the interest of minimal redundancy and compat with other
implementations of the spec, please stick to a single set of ids for
each entry, and according to the spec that's the file name. If you
have multiple id concepts for the same thing then things start
becoming ambiguous.
Lennart
--
Lennart Poettering, Red Hat