[systemd-devel] [v1] shutdown: add kexec loading, avoid calling `kexec` binary unnessecarily
Shawn Landden
shawnlandden at gmail.com
Fri Feb 27 17:02:13 PST 2015
On Thu, Feb 26, 2015 at 12:04 AM, Jan Janssen <medhefgo at web.de> wrote:
> Shawn Landden <shawn <at> churchofgit.com> writes:
>
> > void strv_free(char **l) {
> > - strv_clear(l);
> > + char **k;
> > +
> > + if (!l)
> > + return;
> > +
> > + for (k = l; *k; k++)
> > + free(*k);
> > +
> > free(l);
> > }
> What are you trying to achieve here? I see no point in optimizing out the
> *l
> = NULL from strv_clear.
>
> > + entry->linux_loc = l + strspn(l,
> WHITESPACE);
> > + else if ((l = startswith(m, "initrd ")))
> > + entry->initrd = l + strspn(l,
> WHITESPACE);
> You need to support more than one initrd per kernel, see
> https://wiki.archlinux.org/index.php/Microcode for why. Also, I am pretty
> sure you can have a initrd=/path/to/initrd in the kernel options entry.
> Since the efi bootloader just appends each given initrd to the kernel
> command line.
>
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.
>
>
> All in all I am wondering why you need a rbtree for all this in the first
> place? A simple hashmap should do just fine.
>
> Also, you're not taking multi-boot into account (the machine-id field).
> You're just discriminating based on the kernel version, but different
> installations could have the same version field.
>
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.
>
> Jan
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
--
---
Shawn Landden
ChurchOfGit.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150227/e8008570/attachment-0001.html>
More information about the systemd-devel
mailing list