[Libguestfs] [PATCH] v2v: linux: Move kernel detection to a separate module.
Pino Toscano
ptoscano at redhat.com
Fri Sep 9 15:48:59 UTC 2016
On Friday, 9 September 2016 16:11:53 CEST Richard W.M. Jones wrote:
> Create a new module [Linux_kernels] which does all kernel detection,
> and also provides a place to define the kernel_info data structure.
>
> This is essentially just code motion.
> ---
Mostly LGTM, only few notes below.
> - if grub_kernels = [] then
> - error (f_"no kernels were found in the grub configuration.\n\nThis probably indicates that %s was unable to parse the grub configuration of this guest.")
> + if bootloader_kernels = [] then
> + error (f_"no kernels were found in the bootloader configuration.\n\nThis probably indicates that %s was unable to parse the grub configuration of this guest.")
> prog;
I guess the second "grub" in the sentence could be "bootloader" as well.
> +
> +val detect_kernels : Guestfs.guestfs -> Types.inspect ->
> + [> `Debian_family ] ->
> + < list_kernels : string list; .. > ->
> + kernel_info list
Hm no better types for the parameters? E.g. Linux_bootloaders.bootloader
for "bootloader" (the 4th parameter).
> +(** This function detects the kernels offered by the Linux
> + bootloader (eg. grub).
> +
> + It will only return the intersection of kernels that are
> + installed and kernels that grub knows about. The first
s/grub/bootloader/
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20160909/8b8f1abc/attachment.sig>
More information about the Libguestfs
mailing list