[Libguestfs] [PATCH 2/5] Make sure every *.ml file has a corresponding *.mli file.

Richard W.M. Jones rjones at redhat.com
Wed Sep 20 16:06:15 UTC 2017


On Tue, Sep 19, 2017 at 04:31:43PM +0200, Pino Toscano wrote:
> On Monday, 18 September 2017 18:39:40 CEST Richard W.M. Jones wrote:
> >  dib/output_format_docker.mli                       |  19 +
> >  dib/output_format_qcow2.mli                        |  19 +
> >  dib/output_format_raw.mli                          |  19 +
> >  dib/output_format_squashfs.mli                     |  19 +
> >  dib/output_format_tar.mli                          |  19 +
> >  dib/output_format_tgz.mli                          |  19 +
> >  dib/output_format_vhd.mli                          |  19 +
> > [...]
> >  sysprep/sysprep_operation_abrt_data.mli            |  19 +
> >  sysprep/sysprep_operation_backup_files.mli         |  19 +
> >  sysprep/sysprep_operation_bash_history.mli         |  19 +
> >  sysprep/sysprep_operation_blkid_tab.mli            |  19 +
> >  sysprep/sysprep_operation_ca_certificates.mli      |  19 +
> >  sysprep/sysprep_operation_crash_data.mli           |  19 +
> >  sysprep/sysprep_operation_cron_spool.mli           |  19 +
> >  sysprep/sysprep_operation_customize.mli            |  19 +
> >  sysprep/sysprep_operation_dhcp_client_state.mli    |  19 +
> >  sysprep/sysprep_operation_dhcp_server_state.mli    |  19 +
> >  sysprep/sysprep_operation_dovecot_data.mli         |  19 +
> >  sysprep/sysprep_operation_firewall_rules.mli       |  19 +
> >  sysprep/sysprep_operation_flag_reconfiguration.mli |  19 +
> >  sysprep/sysprep_operation_fs_uuids.mli             |  19 +
> >  sysprep/sysprep_operation_kerberos_data.mli        |  19 +
> >  sysprep/sysprep_operation_logfiles.mli             |  19 +
> >  sysprep/sysprep_operation_lvm_uuids.mli            |  19 +
> >  sysprep/sysprep_operation_machine_id.mli           |  19 +
> >  sysprep/sysprep_operation_mail_spool.mli           |  19 +
> >  sysprep/sysprep_operation_net_hostname.mli         |  19 +
> >  sysprep/sysprep_operation_net_hwaddr.mli           |  19 +
> >  sysprep/sysprep_operation_pacct_log.mli            |  19 +
> >  .../sysprep_operation_package_manager_cache.mli    |  19 +
> >  sysprep/sysprep_operation_pam_data.mli             |  19 +
> >  sysprep/sysprep_operation_passwd_backups.mli       |  19 +
> >  sysprep/sysprep_operation_puppet_data_log.mli      |  19 +
> >  .../sysprep_operation_rh_subscription_manager.mli  |  19 +
> >  sysprep/sysprep_operation_rhn_systemid.mli         |  19 +
> >  sysprep/sysprep_operation_rpm_db.mli               |  19 +
> >  sysprep/sysprep_operation_samba_db_log.mli         |  19 +
> >  sysprep/sysprep_operation_script.mli               |  19 +
> >  sysprep/sysprep_operation_smolt_uuid.mli           |  19 +
> >  sysprep/sysprep_operation_ssh_hostkeys.mli         |  19 +
> >  sysprep/sysprep_operation_ssh_userdir.mli          |  19 +
> >  sysprep/sysprep_operation_sssd_db_log.mli          |  19 +
> >  sysprep/sysprep_operation_tmp_files.mli            |  19 +
> >  sysprep/sysprep_operation_udev_persistent_net.mli  |  19 +
> >  sysprep/sysprep_operation_user_account.mli         |  19 +
> >  sysprep/sysprep_operation_utmp.mli                 |  19 +
> >  sysprep/sysprep_operation_yum_uuid.mli             |  19 +
> 
> Would it be possible to generate the files above automatically, during
> build?  After all, they all are empty interfaces.

Yes they could be.

> > +val libdir : string
> > +(** The configure value [@libdir@] (fully expanded into a path). *)
> 
> I had this doubt when talking with Cédric about his
> virt-builder-repository patches: is this module actually used anywhere?
> It doesn't look so, so I would just drop it instead.

Yup looks as if it is not used.  It's last use was dropped in
commit fd63d896445260ce83f88e58c0219606f97dca9e (in 2013!)

I'll add a new patch to remove it in v2.

> > diff --git a/dib/elements.mli b/dib/elements.mli
> > +(** Parsing and handling of elements. *)
> > +
> > +type element = {
> > +  directory : string;
> 
> (** directory of the element *)

OK I'll fix all this stuff.

> > +val string_index_fn : (char -> bool) -> string -> int
> > +(** Apply function to each character in the string.  If the function
> > +    returns true, return the index of the character.
> > +
> > +    @raise Not_found if no match *)
> 
> Or "Like {String.index}, but using a function instead of a single
> character".

This should probably be in the String module too.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list