[Libguestfs] [PATCH v8 5/7] mllib: add do_mv helper function to Common_utils

Pino Toscano ptoscano at redhat.com
Thu Sep 14 15:01:13 UTC 2017


On Tuesday, 12 September 2017 09:03:12 CEST Cédric Bosdonnat wrote:
> ---
>  mllib/common_utils.ml  | 6 ++++++
>  mllib/common_utils.mli | 3 +++
>  2 files changed, 9 insertions(+)

Since it is used only in virt-builder-repository ATM, I'd put it there
(it can be always easily moved to Std_utils / Common_utils).

> +let do_mv src dest =
> +  let cmd = [ "mv"; src; dest ] in
> +  let r = run_command cmd in
> +  if r <> 0 then
> +    error (f_"moving file '%s' to '%s' failed") src dest

Since this patch was done, Rich introduced Unicode quotes, so:

  error (f_"moving file ‘%s’ to ‘%s’ failed") src dest

> +val do_mv : string -> string -> unit
> +(** Run the mv command, and exit with an error if it failed *)

Nitpick: missing period at the end of the sentence.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170914/2a1b55e2/attachment.sig>


More information about the Libguestfs mailing list