From e001191c79e3e890d433fa237deda2332773ab97 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Mar 2022 15:36:00 +0000 Subject: [PATCH] v2v: Move creation of v2v directory until after option parsing Only after option parsing does the -v (verbose) option take effect, and so any debug messages emitted before this point are not seen. In particular, debug messages emitted when creating the v2v directory were lost. In any case there's no point creating this directory until nearer the point when we might actually need it. (cherry picked from commit 88aaf8263ae89a40e72197ba58f08bc777dc59c3) --- v2v/v2v.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index 71dd1c4d..661f2dec 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -37,9 +37,6 @@ open Utils let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)" let mac_ip_re = PCRE.compile ~anchored:true "([[:xdigit:]]|:|\\.)+" -(* Create the temporary directory to control conversion. *) -let v2vdir = create_v2v_directory () - let rec main () = let set_string_option_once optname optref arg = match !optref with @@ -333,6 +330,9 @@ read the man page virt-v2v(1). debug "libvirt version: %d.%d.%d" major minor release ); + (* Create the temporary directory to control conversion. *) + let v2vdir = create_v2v_directory () in + (* Dereference the arguments. *) let args = List.rev !args in let input_conn = !input_conn in -- 2.31.1