[Libguestfs] [PATCH 1/2] mltools: create a cmdline_options struct

Pino Toscano ptoscano at redhat.com
Thu Sep 20 15:21:10 UTC 2018


On Thursday, 20 September 2018 12:07:46 CEST Richard W.M. Jones wrote:
> On Wed, Sep 19, 2018 at 12:37:00PM +0200, Pino Toscano wrote:
> > diff --git a/common/mltools/tools_utils.mli b/common/mltools/tools_utils.mli
> > index 2b8c2b78a..99984bfa1 100644
> > --- a/common/mltools/tools_utils.mli
> > +++ b/common/mltools/tools_utils.mli
> > @@ -74,7 +74,13 @@ val machine_readable : unit -> machine_readable_fn option
> >      readable output to, in case it was enabled via
> >      [--machine-readable]. *)
> >  
> > -val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> Getopt.t
> > +type cmdline_options = {
> > +  getopt : Getopt.t;              (** The actual Getopt handle. *)
> > +}
> > +(** Structure representing all the data needed for handling command
> > +    line options. *)
> > +
> > +val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?key_opts:bool -> ?machine_readable:bool -> Getopt.usage_msg -> cmdline_options
> >  (** Adds the standard libguestfs command line options to the specified ones,
> >      sorting them, and setting [long_options] to them.
> >  
> > @@ -84,7 +90,7 @@ val create_standard_options : Getopt.speclist -> ?anon_fun:Getopt.anon_fun -> ?k
> >      [machine_readable] specifies whether add the [--machine-readable]
> >      option.
> >  
> > -    Returns a new [Getopt.t] handle. *)
> > +    Returns a new [cmdline_options] structure. *)
> 
> There's actually a bug in the old documentation here which should be
> fixed at the same time.  It should use {!...} to link the reference,
> ie:
> 
>     Returns a new {!cmdline_options} structure. *)

Good idea, thanks.

-- 
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/20180920/ab29246f/attachment.sig>


More information about the Libguestfs mailing list