[Libguestfs] [v2v PATCH 1/2] rhv-upload: Validate UUIDs passed to -oo rhv-disk-uuid (RHBZ#1789279)

Richard W.M. Jones rjones at redhat.com
Fri Jan 24 09:38:22 UTC 2020


On Fri, Jan 24, 2020 at 09:34:04AM +0000, Richard W.M. Jones wrote:
> Or even better if you lazily evaluate the regexp so it is
> only compiled once when the function is first called:
> 
>   let is_nonnil_uuid =
>     let rex_uuid = lazy (
>       let nil_uuid = "00000000-0000-0000-0000-000000000000" in

nil_uuid needs to be defined outside the lazy () clause, but you get the idea.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list