From 909c10d758887958c9e077732fe9beead55ec4e4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 16 Apr 2014 21:12:30 +0100 Subject: [PATCH] sparsify: If using -v (verbose), ensure #disk_create runs verbose too. --- sparsify/copying.ml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sparsify/copying.ml b/sparsify/copying.ml index 2765cf483..5123bc2f1 100644 --- a/sparsify/copying.ml +++ b/sparsify/copying.ml @@ -126,9 +126,13 @@ You can ignore this warning or change it to a hard failure using the * - detect if compat=1.1 was supported * - add lazy_refcounts option *) - (new G.guestfs ())#disk_create - ~backingfile:indisk ?backingformat:format ~compat:"1.1" - tmp "qcow2" Int64.minus_one; + let () = + let g = new G.guestfs () in + if trace then g#set_trace true; + if verbose then g#set_verbose true; + g#disk_create + ~backingfile:indisk ?backingformat:format ~compat:"1.1" + tmp "qcow2" Int64.minus_one in tmp in