[Libguestfs] [PATCH 23/27] daemon: Reimplement ‘md_detail’ API in OCaml.
Pino Toscano
ptoscano at redhat.com
Thu Jul 20 15:15:46 UTC 2017
On Friday, 14 July 2017 15:39:31 CEST Richard W.M. Jones wrote:
> +let md_detail md =
> + let out = command "mdadm" ["-D"; "--export"; md] in
> +
> + (* Split the command output into lines. *)
> + let out = String.trim out in
> + let lines = String.nsplit "\n" out in
If here we do:
let lines = List.filter ((<>) "") lines in
then later on we can use List.map instead of filter_map.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170720/8aefb860/attachment.sig>
More information about the Libguestfs
mailing list