[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] [PATCH] v2v: bootloaders: search grub config for all distributions



On 01.11.2016 13:11, Richard W.M. Jones wrote:
On Thu, Oct 27, 2016 at 08:22:30PM +0300, Pavel Butsykin wrote:
    match typ with
    | Grub1 ->
-    if config_file = "/boot/efi/EFI/redhat/grub.conf" then
-      g#aug_transform "grub" "/boot/efi/EFI/redhat/grub.conf";
-
+    (match inspect.i_firmware with
+    | I_BIOS -> ()
+    | I_UEFI _ -> g#aug_transform "grub" config_file
+    );
      new bootloader_grub1 g inspect config_file
    | Grub2 -> new bootloader_grub2 g config_file

I don't think this part of the patch is correct.  We need to use the
Augeas transform only for a particular path which is missing from the
Augeas lens.

It is necessary for /EFI/redhat/, but no need for others?

What do you think of the attached version instead?  It's smaller and
more efficient (only makes 2 libguestfs API calls in the normal case)?

Yeah, I agree. And in this version the code is easier to read :)

I'm still running tests on it.l

Rich.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]