mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
v2v: ignore missing kernels from grub (RHBZ#1230412)
Raise a warning for each kernel specified in grub which does not actually exist, keep going on with the conversion using the remaining (existing) kernels.
This commit is contained in:
@@ -364,7 +364,14 @@ let rec convert ~keep_serial_console (g : G.guestfs) inspect source =
|
||||
statbuf.G.st_dev = s.G.st_dev && statbuf.G.st_ino = s.G.st_ino
|
||||
) installed_kernels in
|
||||
Some kernel
|
||||
with Not_found -> None
|
||||
with
|
||||
| Not_found -> None
|
||||
| G.Error msg as exn ->
|
||||
(* If it isn't "no such file or directory", then re-raise it. *)
|
||||
if g#last_errno () <> G.Errno.errno_ENOENT then raise exn;
|
||||
warning (f_"ignoring kernel %s in grub, as it does not exist.")
|
||||
vmlinuz;
|
||||
None
|
||||
) vmlinuzes in
|
||||
|
||||
if verbose () then (
|
||||
|
||||
Reference in New Issue
Block a user