[Libguestfs] [PATCH v2v 1/2] convert: Don't duplicate grub2-mkconfig invocations
Richard W.M. Jones
rjones at redhat.com
Tue May 17 10:59:27 UTC 2022
We were invoking grub2-mkconfig in the same way in two different
places. This just refactors one of the calls so it uses the #update
method. It should make no difference.
---
convert/linux_bootloaders.ml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/convert/linux_bootloaders.ml b/convert/linux_bootloaders.ml
index 0bde2c0d73..a70b65a41c 100644
--- a/convert/linux_bootloaders.ml
+++ b/convert/linux_bootloaders.ml
@@ -333,7 +333,7 @@ object (self)
g#aug_save ();
try
- ignore (g#command [| grub2_mkconfig_cmd; "-o"; grub_config |])
+ self#update ()
with
G.Error msg ->
warning (f_"could not rebuild grub2 configuration file (%s). This may mean that grub output will not be sent to the serial port, but otherwise should be harmless. Original error message: %s")
--
2.35.1
More information about the Libguestfs
mailing list