On Thu, Feb 26, 2015 at 10:03:07AM +0100, Pino Toscano wrote:
Make sure that -x enables tracing and -v enables verbose mode, just
like
other tools do.
Kind of followup of commit b6b9b90dd74c7b9204bdf218aa9360e117308e78.
---
builder/builder.ml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index a519913..0ddf076 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -555,7 +555,8 @@ let main () =
let preallocation = if oformat = "qcow2" then Some "metadata"
else None in
let () =
let g = new G.guestfs () in
- if verbose then ( g#set_trace true; g#set_verbose true );
+ if trace then g#set_trace true;
+ if verbose then g#set_verbose true;
g#disk_create ?preallocation ofile oformat osize in
let cmd =
sprintf "virt-resize%s%s%s --output-format %s%s%s %s %s"
@@ -608,7 +609,8 @@ let main () =
msg (f_"Opening the new disk");
let g =
let g = new G.guestfs () in
- if verbose then g#set_trace true;
+ if trace then g#set_trace true;
+ if verbose then g#set_verbose true;
(match memsize with None -> () | Some memsize -> g#set_memsize memsize);
(match smp with None -> () | Some smp -> g#set_smp smp);
Yup - obviously bogus code. ACK.
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/