search for: 0ffa92c

Displaying 3 results from an estimated 3 matches for "0ffa92c".

2016 May 22
0
[PATCH 2/2] ocaml tools: Use a common debug function.
...; (quote logfile) env_vars cmd in - if verbose () then printf "running command:\n%s\n%!" cmd; + debug "running command:\n%s" cmd; try ignore (g#sh cmd) with Guestfs.Error msg -> diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index e1317a7..0ffa92c 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -384,6 +384,11 @@ let info fs = in ksprintf display fs +(* Print a debug message. *) +let debug fs = + let display str = if verbose () then prerr_endline str in + ksprintf display fs + (* Common function to create a new Gu...
2016 May 22
4
ocaml tools: Use a common debug function.
Add a Common_utils.debug function for printing messages only when in verbose mode. Rich.
2016 May 23
7
[PATCH 1/5] mllib: make external_command echo the command executed
...h-colons --with-fingerprint --with-fingerprint --list-keys %s" gpg gpghome !fingerprint in - debug "%s" cmd; let lines = external_command cmd in let current = ref None in let subkeys = ref [] in diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 0ffa92c..32071f4 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -649,7 +649,9 @@ let compare_lvm2_uuids uuid1 uuid2 = loop 0 0 (* Run an external command, slurp up the output as a list of lines. *) -let external_command cmd = +let external_command ?(echo_cmd = true) cmd = + if ech...