<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Feb 26, 2015 at 12:04 AM, Jan Janssen <span dir="ltr"><<a href="mailto:medhefgo@web.de" target="_blank">medhefgo@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Shawn Landden <shawn <at> <a href="http://churchofgit.com" target="_blank">churchofgit.com</a>> writes:<br>
<br>
> void strv_free(char **l) {<br>
> - strv_clear(l);<br>
> + char **k;<br>
> +<br>
> + if (!l)<br>
> + return;<br>
> +<br>
> + for (k = l; *k; k++)<br>
> + free(*k);<br>
> +<br>
> free(l);<br>
> }<br>
</span>What are you trying to achieve here? I see no point in optimizing out the *l<br>
= NULL from strv_clear.<br>
<span class=""><br>
> + entry->linux_loc = l + strspn(l,<br>
WHITESPACE);<br>
> + else if ((l = startswith(m, "initrd ")))<br>
> + entry->initrd = l + strspn(l,<br>
WHITESPACE);<br>
</span>You need to support more than one initrd per kernel, see<br>
<a href="https://wiki.archlinux.org/index.php/Microcode" target="_blank">https://wiki.archlinux.org/index.php/Microcode</a> for why. Also, I am pretty<br>
sure you can have a initrd=/path/to/initrd in the kernel options entry.<br>
Since the efi bootloader just appends each given initrd to the kernel<br>
command line.<br></blockquote><div>I can't support more than one initrd per kernel with the kexec_file_load() syscall, and if initrd on the commandline works, then it will still work with this patch, so i don't need to change anything. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
All in all I am wondering why you need a rbtree for all this in the first<br>
place? A simple hashmap should do just fine.<br>
<br>
Also, you're not taking multi-boot into account (the machine-id field).<br>
You're just discriminating based on the kernel version, but different<br>
installations could have the same version field.<br></blockquote><div>fixed by testing that the machine-id is the same (I forgot this part of the spec thanks). Is there anyway I should save defaults? Is there anything in the spec that is missing? Perhaps it should specify how to save last-boot.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Jan<br>
<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br>---<br>Shawn Landden</div><div dir="ltr">ChurchOfGit.com</div></div></div></div>
</div></div>