summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-02 18:26:48 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-02 19:47:33 +0100
commitd331fd70e2c3ba2815460c8cd93a97eb9a81c6a5 (patch)
tree40ff4f1be508a66ecf7d52e6511a6e446938a465
parent11d655ab83211eb6808d32296cbbab31fc023aac (diff)
downloadlibguestfs-d331fd70e2c3ba2815460c8cd93a97eb9a81c6a5.tar.gz
libguestfs-d331fd70e2c3ba2815460c8cd93a97eb9a81c6a5.tar.xz
libguestfs-d331fd70e2c3ba2815460c8cd93a97eb9a81c6a5.zip
generator: Rename 'generator_*' as '*'.
This is a simple renaming of the files/modules. Note that in OCaml, module names are derived from filenames by capitalizing the first letter. Thus the old module names had the form "Generator_api_versions". The new modules names have the form "Api_versions".
-rw-r--r--generator/Makefile.am70
-rw-r--r--generator/README24
-rw-r--r--generator/actions.ml (renamed from generator/generator_actions.ml)4
-rw-r--r--generator/actions.mli (renamed from generator/generator_actions.mli)12
-rw-r--r--generator/api_versions.ml (renamed from generator/generator_api_versions.ml)2
-rw-r--r--generator/api_versions.mli (renamed from generator/generator_api_versions.mli)0
-rw-r--r--generator/bindtests.ml (renamed from generator/generator_bindtests.ml)16
-rw-r--r--generator/c.ml (renamed from generator/generator_c.ml)18
-rw-r--r--generator/checks.ml (renamed from generator/generator_checks.ml)6
-rw-r--r--generator/csharp.ml (renamed from generator/generator_csharp.ml)14
-rw-r--r--generator/daemon.ml (renamed from generator/generator_daemon.ml)16
-rw-r--r--generator/docstrings.ml (renamed from generator/generator_docstrings.ml)6
-rw-r--r--generator/erlang.ml (renamed from generator/generator_erlang.ml)18
-rw-r--r--generator/errnostring.ml (renamed from generator/generator_errnostring.ml)10
-rw-r--r--generator/events.ml (renamed from generator/generator_events.ml)2
-rw-r--r--generator/fish.ml (renamed from generator/generator_fish.ml)20
-rw-r--r--generator/gobject.ml (renamed from generator/generator_gobject.ml)14
-rw-r--r--generator/haskell.ml (renamed from generator/generator_haskell.ml)14
-rw-r--r--generator/java.ml (renamed from generator/generator_java.ml)16
-rw-r--r--generator/main.ml (renamed from generator/generator_main.ml)40
-rw-r--r--generator/ocaml.ml (renamed from generator/generator_ocaml.ml)18
-rw-r--r--generator/optgroups.ml (renamed from generator/generator_optgroups.ml)4
-rw-r--r--generator/perl.ml (renamed from generator/generator_perl.ml)18
-rw-r--r--generator/php.ml (renamed from generator/generator_php.ml)16
-rw-r--r--generator/pr.ml (renamed from generator/generator_pr.ml)2
-rw-r--r--generator/pr.mli (renamed from generator/generator_pr.mli)0
-rw-r--r--generator/prepopts.ml (renamed from generator/generator_prepopts.ml)0
-rw-r--r--generator/prepopts.mli (renamed from generator/generator_prepopts.mli)0
-rw-r--r--generator/python.ml (renamed from generator/generator_python.ml)18
-rw-r--r--generator/ruby.ml (renamed from generator/generator_ruby.ml)18
-rw-r--r--generator/structs.ml (renamed from generator/generator_structs.ml)4
-rw-r--r--generator/structs.mli (renamed from generator/generator_structs.mli)2
-rw-r--r--generator/tests_c_api.ml (renamed from generator/generator_tests_c_api.ml)14
-rw-r--r--generator/types.ml (renamed from generator/generator_types.ml)2
-rw-r--r--generator/utils.ml (renamed from generator/generator_utils.ml)12
-rw-r--r--generator/utils.mli (renamed from generator/generator_utils.mli)14
-rw-r--r--generator/xdr.ml (renamed from generator/generator_xdr.ml)14
-rw-r--r--src/guestfs.pod19
38 files changed, 247 insertions, 250 deletions
diff --git a/generator/Makefile.am b/generator/Makefile.am
index eb6b79d6..e218ffac 100644
--- a/generator/Makefile.am
+++ b/generator/Makefile.am
@@ -16,41 +16,41 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
SOURCES = \
- generator_types.ml \
- generator_utils.mli \
- generator_utils.ml \
- generator_actions.mli \
- generator_actions.ml \
- generator_structs.mli \
- generator_structs.ml \
- generator_api_versions.mli \
- generator_api_versions.ml \
- generator_optgroups.ml \
- generator_prepopts.mli \
- generator_prepopts.ml \
- generator_events.ml \
- generator_pr.mli \
- generator_pr.ml \
- generator_docstrings.ml \
- generator_checks.ml \
- generator_c.ml \
- generator_xdr.ml \
- generator_daemon.ml \
- generator_tests_c_api.ml \
- generator_fish.ml \
- generator_ocaml.ml \
- generator_perl.ml \
- generator_python.ml \
- generator_ruby.ml \
- generator_java.ml \
- generator_haskell.ml \
- generator_csharp.ml \
- generator_php.ml \
- generator_erlang.ml \
- generator_gobject.ml \
- generator_bindtests.ml \
- generator_errnostring.ml \
- generator_main.ml
+ types.ml \
+ utils.mli \
+ utils.ml \
+ actions.mli \
+ actions.ml \
+ structs.mli \
+ structs.ml \
+ api_versions.mli \
+ api_versions.ml \
+ optgroups.ml \
+ prepopts.mli \
+ prepopts.ml \
+ events.ml \
+ pr.mli \
+ pr.ml \
+ docstrings.ml \
+ checks.ml \
+ c.ml \
+ xdr.ml \
+ daemon.ml \
+ tests_c_api.ml \
+ fish.ml \
+ ocaml.ml \
+ perl.ml \
+ python.ml \
+ ruby.ml \
+ java.ml \
+ haskell.ml \
+ csharp.ml \
+ php.ml \
+ erlang.ml \
+ gobject.ml \
+ bindtests.ml \
+ errnostring.ml \
+ main.ml
SOURCES_ML = $(filter %.ml,$(SOURCES))
OBJECTS = $(SOURCES_ML:.ml=.cmo)
diff --git a/generator/README b/generator/README
index afc58ebc..442b0be6 100644
--- a/generator/README
+++ b/generator/README
@@ -2,8 +2,8 @@ This program generates a large amount of code and documentation for
all the daemon actions.
To add a new action there are only two files you need to change,
-'generator_actions.ml' to describe the interface, and
-daemon/<somefile>.c to write the implementation.
+'actions.ml' to describe the interface, and daemon/<somefile>.c to
+write the implementation.
After editing these files, build it (make -C generator) to regenerate
all the output files. 'make' will rerun this automatically when
@@ -19,19 +19,19 @@ correctly. 'vim' comes with a good OCaml editing mode by default.
(2) Read the resources at http://ocaml-tutorial.org/
-(3) A module called 'Generator_foo' is defined in one or two files
-called 'generator_foo.mli' and 'generator_foo.ml' (NB: lowercase first
-letter). The *.mli file, if present, defines the public interface for
-the module. The *.ml file is the implementation. If the *.mli file
-is missing then everything is exported.
+(3) A module called 'Foo' is defined in one or two files called
+'foo.mli' and 'foo.ml' (NB: lowercase first letter). The *.mli file,
+if present, defines the public interface for the module. The *.ml
+file is the implementation. If the *.mli file is missing then
+everything is exported.
Some notable files in this directory:
-generator_actions.ml The libguestfs API.
-generator_structs.ml Structures returned by the API.
-generator_c.ml Generate C API.
-generator_<lang>.ml Generate bindings for <lang>.
-generator_main.ml The main generator program.
+ actions.ml The libguestfs API.
+ structs.ml Structures returned by the API.
+ c.ml Generate C API.
+ <lang>.ml Generate bindings for <lang>.
+ main.ml The main generator program.
Note about long descriptions:
diff --git a/generator/generator_actions.ml b/generator/actions.ml
index 79ed8f49..65012adb 100644
--- a/generator/generator_actions.ml
+++ b/generator/actions.ml
@@ -18,8 +18,8 @@
(* Please read generator/README first. *)
-open Generator_types
-open Generator_utils
+open Types
+open Utils
(* Default settings for all action fields. So we copy and override
* this struct by writing '{ defaults with name = &c }'
diff --git a/generator/generator_actions.mli b/generator/actions.mli
index a273caa4..1ad509ae 100644
--- a/generator/generator_actions.mli
+++ b/generator/actions.mli
@@ -20,24 +20,24 @@
(** The libguestfs API. *)
-val non_daemon_functions : Generator_types.action list
+val non_daemon_functions : Types.action list
(** API actions which are implemented within the library itself. *)
-val daemon_functions : Generator_types.action list
+val daemon_functions : Types.action list
(** API actions which are implemented by the daemon. *)
-val all_functions : Generator_types.action list
+val all_functions : Types.action list
(** Concatenation of [non_daemon_functions] and [daemon_functions] lists. *)
-val all_functions_sorted : Generator_types.action list
+val all_functions_sorted : Types.action list
(** [all_functions] but sorted by name. *)
-val test_functions : Generator_types.action list
+val test_functions : Types.action list
(** Internal test functions used to test the language bindings. *)
val max_proc_nr : int
(** The largest procedure number used (also saved in [src/MAX_PROC_NR] and
used as the minor version number of the shared library). *)
-val fish_commands : Generator_types.action list
+val fish_commands : Types.action list
(** Non-API meta-commands available only in guestfish. *)
diff --git a/generator/generator_api_versions.ml b/generator/api_versions.ml
index 1749752e..358f3ed9 100644
--- a/generator/generator_api_versions.ml
+++ b/generator/api_versions.ml
@@ -18,7 +18,7 @@
(* Please read generator/README first. *)
-open Generator_utils
+open Utils
let hash = Hashtbl.create 13
diff --git a/generator/generator_api_versions.mli b/generator/api_versions.mli
index 0932a671..0932a671 100644
--- a/generator/generator_api_versions.mli
+++ b/generator/api_versions.mli
diff --git a/generator/generator_bindtests.ml b/generator/bindtests.ml
index 54c46fa2..37abb054 100644
--- a/generator/generator_bindtests.ml
+++ b/generator/bindtests.ml
@@ -20,14 +20,14 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
let rec generate_bindtests () =
generate_header CStyle LGPLv2plus;
diff --git a/generator/generator_c.ml b/generator/c.ml
index 936447b9..d15b4d99 100644
--- a/generator/generator_c.ml
+++ b/generator/c.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_api_versions
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Api_versions
+open Optgroups
+open Actions
+open Structs
+open Events
(* Generate C API. *)
diff --git a/generator/generator_checks.ml b/generator/checks.ml
index d8c8d2e4..8ebfd987 100644
--- a/generator/generator_checks.ml
+++ b/generator/checks.ml
@@ -18,9 +18,9 @@
(* Please read generator/README first. *)
-open Generator_types
-open Generator_utils
-open Generator_actions
+open Types
+open Utils
+open Actions
(* Check function names etc. for consistency. *)
let () =
diff --git a/generator/generator_csharp.ml b/generator/csharp.ml
index e1a31cfd..9f86f48f 100644
--- a/generator/generator_csharp.ml
+++ b/generator/csharp.ml
@@ -20,13 +20,13 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
let rec generate_csharp () =
generate_header CPlusPlusStyle LGPLv2plus;
diff --git a/generator/generator_daemon.ml b/generator/daemon.ml
index 9afb1094..06ee8120 100644
--- a/generator/generator_daemon.ml
+++ b/generator/daemon.ml
@@ -20,14 +20,14 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
(* Generate daemon/actions.h. *)
let generate_daemon_actions_h () =
diff --git a/generator/generator_docstrings.ml b/generator/docstrings.ml
index 746e010f..d7d00012 100644
--- a/generator/generator_docstrings.ml
+++ b/generator/docstrings.ml
@@ -21,9 +21,9 @@
open Unix
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
+open Types
+open Utils
+open Pr
(* Handling for function flags. *)
let progress_message =
diff --git a/generator/generator_erlang.ml b/generator/erlang.ml
index b2ea8b36..673394e0 100644
--- a/generator/generator_erlang.ml
+++ b/generator/erlang.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
+open Events
let rec generate_erlang_erl () =
generate_header ErlangStyle LGPLv2plus;
diff --git a/generator/generator_errnostring.ml b/generator/errnostring.ml
index a0249892..098c564e 100644
--- a/generator/generator_errnostring.ml
+++ b/generator/errnostring.ml
@@ -20,10 +20,10 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
+open Types
+open Utils
+open Pr
+open Docstrings
(* Generate the functions errno_to_string and string_to_errno which
* convert errno (eg. EINVAL) into string ("EINVAL") and back again,
@@ -179,7 +179,7 @@ let errnos = [
let () =
(* Check list is sorted and no duplicates. *)
- let file = "generator/generator_errnostring.ml" in
+ let file = "generator/errnostring.ml" in
let check str =
let len = String.length str in
if len == 0 || len > 32 then
diff --git a/generator/generator_events.ml b/generator/events.ml
index df74af33..d025f57b 100644
--- a/generator/generator_events.ml
+++ b/generator/events.ml
@@ -18,7 +18,7 @@
(* Please read generator/README first. *)
-open Generator_utils
+open Utils
(* NB: DO NOT REORDER THESE, as doing so will change the ABI. Only
* add new event types at the end of the list.
diff --git a/generator/generator_fish.ml b/generator/fish.ml
index 49588aad..e8ab91f4 100644
--- a/generator/generator_fish.ml
+++ b/generator/fish.ml
@@ -20,16 +20,16 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_prepopts
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open Prepopts
+open C
+open Events
let doc_opttype_of = function
| OBool n -> "true|false"
diff --git a/generator/generator_gobject.ml b/generator/gobject.ml
index f1178232..4a57ba32 100644
--- a/generator/generator_gobject.ml
+++ b/generator/gobject.ml
@@ -22,13 +22,13 @@
open Printf
-open Generator_actions
-open Generator_docstrings
-open Generator_events
-open Generator_pr
-open Generator_structs
-open Generator_types
-open Generator_utils
+open Actions
+open Docstrings
+open Events
+open Pr
+open Structs
+open Types
+open Utils
let camel_of_name { camel_name = camel_name } = "Guestfs" ^ camel_name
diff --git a/generator/generator_haskell.ml b/generator/haskell.ml
index a9767bf3..cf23fdf4 100644
--- a/generator/generator_haskell.ml
+++ b/generator/haskell.ml
@@ -20,13 +20,13 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
let rec generate_haskell_hs () =
generate_header HaskellStyle LGPLv2plus;
diff --git a/generator/generator_java.ml b/generator/java.ml
index 369b8aa8..4f549dc5 100644
--- a/generator/generator_java.ml
+++ b/generator/java.ml
@@ -20,14 +20,14 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
(* Generate Java bindings GuestFS.java file. *)
let rec generate_java_java () =
diff --git a/generator/generator_main.ml b/generator/main.ml
index d13f0bb7..793bdd55 100644
--- a/generator/generator_main.ml
+++ b/generator/main.ml
@@ -21,27 +21,27 @@
open Unix
open Printf
-open Generator_pr
-open Generator_structs
-open Generator_api_versions
+open Pr
+open Structs
+open Api_versions
-open Generator_c
-open Generator_xdr
-open Generator_daemon
-open Generator_tests_c_api
-open Generator_fish
-open Generator_ocaml
-open Generator_perl
-open Generator_python
-open Generator_ruby
-open Generator_java
-open Generator_haskell
-open Generator_csharp
-open Generator_php
-open Generator_erlang
-open Generator_gobject
-open Generator_bindtests
-open Generator_errnostring
+open C
+open Xdr
+open Daemon
+open Tests_c_api
+open Fish
+open Ocaml
+open Perl
+open Python
+open Ruby
+open Java
+open Haskell
+open Csharp
+open Php
+open Erlang
+open Gobject
+open Bindtests
+open Errnostring
let perror msg = function
| Unix_error (err, _, _) ->
diff --git a/generator/generator_ocaml.ml b/generator/ocaml.ml
index 1e088f1b..b04eb5fe 100644
--- a/generator/generator_ocaml.ml
+++ b/generator/ocaml.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
+open Events
(* Generate the OCaml bindings interface. *)
let rec generate_ocaml_mli () =
diff --git a/generator/generator_optgroups.ml b/generator/optgroups.ml
index d947fd66..81773752 100644
--- a/generator/generator_optgroups.ml
+++ b/generator/optgroups.ml
@@ -18,8 +18,8 @@
(* Please read generator/README first. *)
-open Generator_types
-open Generator_actions
+open Types
+open Actions
(* Create list of optional groups. *)
let optgroups =
diff --git a/generator/generator_perl.ml b/generator/perl.ml
index 07644e87..f1a790f7 100644
--- a/generator/generator_perl.ml
+++ b/generator/perl.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
+open Events
(* Generate Perl xs code, a sort of crazy variation of C with macros. *)
let rec generate_perl_xs () =
diff --git a/generator/generator_php.ml b/generator/php.ml
index 42983ef9..7f8fde40 100644
--- a/generator/generator_php.ml
+++ b/generator/php.ml
@@ -20,14 +20,14 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
let rec generate_php_h () =
generate_header CStyle LGPLv2plus;
diff --git a/generator/generator_pr.ml b/generator/pr.ml
index fe44ba2d..fd927206 100644
--- a/generator/generator_pr.ml
+++ b/generator/pr.ml
@@ -21,7 +21,7 @@
open Unix
open Printf
-open Generator_utils
+open Utils
(* Output channel, 'pr' prints to this. *)
let chan = ref Pervasives.stdout
diff --git a/generator/generator_pr.mli b/generator/pr.mli
index 693c6813..693c6813 100644
--- a/generator/generator_pr.mli
+++ b/generator/pr.mli
diff --git a/generator/generator_prepopts.ml b/generator/prepopts.ml
index ab8d33c5..ab8d33c5 100644
--- a/generator/generator_prepopts.ml
+++ b/generator/prepopts.ml
diff --git a/generator/generator_prepopts.mli b/generator/prepopts.mli
index b6efb617..b6efb617 100644
--- a/generator/generator_prepopts.mli
+++ b/generator/prepopts.mli
diff --git a/generator/generator_python.ml b/generator/python.ml
index c1a0c30d..482b189e 100644
--- a/generator/generator_python.ml
+++ b/generator/python.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
+open Events
(* Generate Python C module. *)
let rec generate_python_c () =
diff --git a/generator/generator_ruby.ml b/generator/ruby.ml
index ec66fbd2..f3b8912d 100644
--- a/generator/generator_ruby.ml
+++ b/generator/ruby.ml
@@ -20,15 +20,15 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
-open Generator_c
-open Generator_events
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
+open C
+open Events
(* Generate ruby bindings. *)
let rec generate_ruby_c () =
diff --git a/generator/generator_structs.ml b/generator/structs.ml
index 2fa373f7..d62fcc5d 100644
--- a/generator/generator_structs.ml
+++ b/generator/structs.ml
@@ -18,8 +18,8 @@
(* Please read generator/README first. *)
-open Generator_types
-open Generator_utils
+open Types
+open Utils
type cols = (string * field) list
diff --git a/generator/generator_structs.mli b/generator/structs.mli
index 95ed2269..56987e0f 100644
--- a/generator/generator_structs.mli
+++ b/generator/structs.mli
@@ -20,7 +20,7 @@
(** Structures returned by the API. *)
-type cols = (string * Generator_types.field) list
+type cols = (string * Types.field) list
(** List of structure fields (called "columns"). *)
val structs : (string * cols) list
diff --git a/generator/generator_tests_c_api.ml b/generator/tests_c_api.ml
index 56b97b56..acd8a749 100644
--- a/generator/generator_tests_c_api.ml
+++ b/generator/tests_c_api.ml
@@ -20,13 +20,13 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
(* Generate the tests. *)
let rec generate_tests () =
diff --git a/generator/generator_types.ml b/generator/types.ml
index 8ab6d0af..e15e5a1d 100644
--- a/generator/generator_types.ml
+++ b/generator/types.ml
@@ -383,7 +383,7 @@ and test_init =
and seq = cmd list
and cmd = string list
-(* Type of an action as declared in Generator_actions module. *)
+(* Type of an action as declared in Actions module. *)
type action = {
name : string; (* name, not including "guestfs_" *)
style : style; (* args and return value *)
diff --git a/generator/generator_utils.ml b/generator/utils.ml
index a4e19d55..8a716bb6 100644
--- a/generator/generator_utils.ml
+++ b/generator/utils.ml
@@ -26,7 +26,7 @@
open Unix
open Printf
-open Generator_types
+open Types
let errcode_of_ret = function
| RConstOptString _ ->
@@ -45,16 +45,14 @@ let string_of_errcode = function
(* Generate a uuidgen-compatible UUID (used in tests). However to
* avoid having the UUID change every time we rebuild the tests,
- * generate it as a function of the contents of the
- * generator_actions.ml file.
+ * generate it as a function of the contents of the actions.ml file.
*
* Originally I thought uuidgen was using RFC 4122, but it doesn't
* appear to.
- *
- * Note that the format must be 01234567-0123-0123-0123-0123456789ab
- *)
+ *
+ * Note that the format must be 01234567-0123-0123-0123-0123456789ab *)
let uuidgen () =
- let s = Digest.to_hex (Digest.file "generator/generator_actions.ml") in
+ let s = Digest.to_hex (Digest.file "generator/actions.ml") in
(* In util-linux <= 2.19, mkswap -U cannot handle the first byte of
* the UUID being zero, so we artificially rewrite such UUIDs.
diff --git a/generator/generator_utils.mli b/generator/utils.mli
index 596c5f33..6581d572 100644
--- a/generator/generator_utils.mli
+++ b/generator/utils.mli
@@ -20,7 +20,7 @@
(** Useful utility functions. *)
-val errcode_of_ret : Generator_types.ret -> Generator_types.errcode
+val errcode_of_ret : Types.ret -> Types.errcode
(** Map [ret] type to the error indication that the action returns,
eg. [errcode_of_ret RErr] => [`ErrorIsMinusOne] (meaning that
these actions return [-1]).
@@ -37,7 +37,7 @@ val uuidgen : unit -> string
type rstructs_used_t = RStructOnly | RStructListOnly | RStructAndList
(** Return type of {!rstructs_used_by}. *)
-val rstructs_used_by : Generator_types.action list -> (string * rstructs_used_t) list
+val rstructs_used_by : Types.action list -> (string * rstructs_used_t) list
(** Returns a list of RStruct/RStructList structs that are returned
by any function. *)
@@ -93,13 +93,13 @@ val explode : string -> char list
val map_chars : (char -> 'a) -> string -> 'a list
(** Explode string, then map function over the characters. *)
-val name_of_argt : Generator_types.argt -> string
+val name_of_argt : Types.argt -> string
(** Extract argument name. *)
-val name_of_optargt : Generator_types.optargt -> string
+val name_of_optargt : Types.optargt -> string
(** Extract optional argument name. *)
-val seq_of_test : Generator_types.test -> Generator_types.seq
+val seq_of_test : Types.test -> Types.seq
(** Extract test sequence from a test. *)
val c_quote : string -> string
@@ -120,7 +120,7 @@ val pod2text : ?width:int -> ?trim:bool -> ?discard:bool -> string -> string ->
This is the slowest part of autogeneration, so the results are
memoized into a temporary file. *)
-val action_compare : Generator_types.action -> Generator_types.action -> int
+val action_compare : Types.action -> Types.action -> int
(** Compare the names of two actions, for sorting. *)
val chars : char -> int -> string
@@ -129,5 +129,5 @@ val chars : char -> int -> string
val spaces : int -> string
(** [spaces n] creates a string of n spaces. *)
-val args_of_optargs : Generator_types.optargs -> Generator_types.args
+val args_of_optargs : Types.optargs -> Types.args
(** Convert a list of optargs into an equivalent list of args *)
diff --git a/generator/generator_xdr.ml b/generator/xdr.ml
index ef9e0f2f..9ba8c53a 100644
--- a/generator/generator_xdr.ml
+++ b/generator/xdr.ml
@@ -20,13 +20,13 @@
open Printf
-open Generator_types
-open Generator_utils
-open Generator_pr
-open Generator_docstrings
-open Generator_optgroups
-open Generator_actions
-open Generator_structs
+open Types
+open Utils
+open Pr
+open Docstrings
+open Optgroups
+open Actions
+open Structs
(* Generate the protocol (XDR) file, 'guestfs_protocol.x' and
* indirectly 'guestfs_protocol.h' and 'guestfs_protocol.c'.
diff --git a/src/guestfs.pod b/src/guestfs.pod
index 7361e0a5..56e4760e 100644
--- a/src/guestfs.pod
+++ b/src/guestfs.pod
@@ -2877,7 +2877,7 @@ To add a new API action there are two changes:
=item 1.
You need to add a description of the call (name, parameters, return
-type, tests, documentation) to C<generator/generator_actions.ml>.
+type, tests, documentation) to C<generator/actions.ml>.
There are two sorts of API action, depending on whether the call goes
through to the daemon in the appliance, or is serviced entirely by the
@@ -2923,13 +2923,12 @@ the OCaml description.
You can supply zero or as many tests as you want per API call. The
tests can either be added as part of the API description
-(C<generator/generator_actions.ml>), or in some rarer cases you may
-want to drop a script into C<tests/*/>. Note that adding
-a script to C<tests/*/> is slower, so if possible use the
-first method.
+(C<generator/actions.ml>), or in some rarer cases you may want to drop
+a script into C<tests/*/>. Note that adding a script to C<tests/*/>
+is slower, so if possible use the first method.
The following describes the test environment used when you add an API
-test in C<generator_actions.ml>.
+test in C<actions.ml>.
The test environment has 4 block devices:
@@ -2959,10 +2958,10 @@ libguestfs appliance and block devices are reused between tests. So
don't try testing L</guestfs_kill_subprocess> :-x
Each test starts with an initial scenario, selected using one of the
-C<Init*> expressions, described in C<generator/generator_types.ml>.
-These initialize the disks mentioned above in a particular way as
-documented in C<generator_types.ml>. You should not assume anything
-about the previous contents of other disks that are not initialized.
+C<Init*> expressions, described in C<generator/types.ml>. These
+initialize the disks mentioned above in a particular way as documented
+in C<types.ml>. You should not assume anything about the previous
+contents of other disks that are not initialized.
You can add a prerequisite clause to any individual test. This is a
run-time check, which, if it fails, causes the test to be skipped.