search for: get_uefi_arch_suffix

Displaying 2 results from an estimated 2 matches for "get_uefi_arch_suffix".

2020 May 15
1
[PATCH] v2v: fix UEFI bootloader for linux guests
...function checks if 'source' contains 's' *) +let contains source s = + let re = Str.regexp_string s in + try + ignore (Str.search_forward re source 0); + true + with Not_found -> false + +(* Helper function to get architecture suffixes for uefi files *) +let get_uefi_arch_suffix arch = + let arch_suffix = + if contains arch "x86_64" then "X64" + else if contains arch "x86_32" then "X32" + else "" in + arch_suffix + +(* Function fixes uefi boot. It's used in both cases: legacy grub and grub2 *) +let fix_uefi g...
2020 Jul 24
3
[PATCH v2] v2v: fix UEFI bootloader for linux guests
...let re = Str.regexp_string s in + try + ignore (Str.search_forward re source 0); + true + with Not_found -> false + ) in + + let cant_fix_uefi () = + info (f_"Can't fix UEFI bootloader. VM may not boot.") + in + + let get_uefi_arch_suffix = function + | "x86_64" -> Some "X64" + | "x86_32" -> Some "X32" + | _ -> None + in + + match get_uefi_arch_suffix inspect.i_arch with + | None -> cant_fix_uefi () + | Some suffix -> ( + let uefi_...