[Libguestfs] [PATCH] convert_linux: translate the first CD-ROM's references in boot conf files

Richard W.M. Jones rjones at redhat.com
Tue Dec 14 20:48:11 UTC 2021


On Tue, Dec 14, 2021 at 08:46:45PM +0000, Richard W.M. Jones wrote:
> On Tue, Dec 14, 2021 at 04:17:49PM +0100, Laszlo Ersek wrote:
> > +    match cdroms with
> > +    | _ :: _ :: _ -> warning (f_"multiple CD-ROMs found; translation of \
> > +                                 CD-ROM references may be inexact")
> > +    | _ -> ();
> > +
> > +    let map = map @
> 
> This part is either wrong or indented incorrectly.  The "let map ..."
> part is part of the second branch of the match statement and doesn't
> run if the warning is printed.
> 
> In any case it's probably better to replace the confusing first match
> with something simpler such as:
> 
>   if List.length cdroms > 2 then

">=" ?  I said it was confusing :-)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list