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