Displaying 2 results from an estimated 2 matches for "bootloader_mountpoint".
2016 Nov 01
3
[PATCH v3] v2v: bootloaders: search grub config for all distributions
..._of_filename path =
+ if String.is_suffix path "/grub.cfg" then
+ Some Grub2
+ else if String.is_suffix path "/grub.conf" ||
+ String.is_suffix path "/menu.lst" then
+ Some Grub1
+ else
+ None
+
+(* Where to start searching for bootloaders. *)
+let bootloader_mountpoint = function
+ | { i_firmware = I_BIOS } -> "/boot"
+ | { i_firmware = I_UEFI _ } -> "/boot/efi/EFI"
+
let detect_bootloader (g : G.guestfs) inspect =
- let config_file, typ =
- let locations = [
- "/boot/grub2/grub.cfg", Grub2;
- "/boot/grub/...
2016 Nov 01
0
Re: [PATCH v3] v2v: bootloaders: search grub config for all distributions
...t bootloader_type_of_filename path =
match last_part_of path '/' with
| Some "grub.cfg" -> Some Grub2
| Some ("grub.conf"|"menu.lst") -> Some Grub1
| Some _ | None -> None
> +(* Where to start searching for bootloaders. *)
> +let bootloader_mountpoint = function
> + | { i_firmware = I_BIOS } -> "/boot"
> + | { i_firmware = I_UEFI _ } -> "/boot/efi/EFI"
It seems to be used only once, so I'd just put it inline below (it's
small to read).
> +
> let detect_bootloader (g : G.guestfs) inspect =
> -...