Skip to content

Commit

Permalink
builder: handle -v and -x flags like in other tools (RHBZ#1196100)
Browse files Browse the repository at this point in the history
Make sure that -x enables tracing and -v enables verbose mode, just like
other tools do.

Kind of followup of commit b6b9b90.
  • Loading branch information
ptoscano committed Feb 26, 2015
1 parent 652af7a commit be79bdf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions builder/builder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit be79bdf

Please sign in to comment.