[Libguestfs] [PATCH v6 11/41] utils: Rename ‘guestfs-internal-frontend.h’ to ‘utils.h’.

Richard W.M. Jones
Thu, 15 Jun 2017 17:06:01 -0000

---
 .gitignore                                            | 2 +-
 builder/index-validate.c                              | 2 +-
 builder/pxzcat-c.c                                    | 2 +-
 common/edit/file-edit.c                               | 2 +-
 common/mlutils/c_utils-c.c                            | 2 +-
 common/options/options.h                              | 2 +-
 common/options/uri.c                                  | 2 +-
 common/parallel/domains.c                             | 2 +-
 common/parallel/estimate-max-threads.c                | 2 +-
 common/parallel/parallel.c                            | 2 +-
 common/progress/progress.c                            | 2 +-
 common/utils/Makefile.am                              | 2 +-
 common/utils/utils.c                                  | 2 +-
 common/utils/{guestfs-internal-frontend.h => utils.h} | 6 +++---
 common/visit/visit.c                                  | 2 +-
 common/windows/windows.c                              | 2 +-
 docs/C_SOURCE_FILES                                   | 2 +-
 erlang/main.c                                         | 2 +-
 fish/fish.h                                           | 2 +-
 fuse/guestunmount.c                                   | 2 +-
 fuse/test-fuse.c                                      | 2 +-
 fuse/test-guestmount-fd.c                             | 2 +-
 fuse/test-guestunmount-fd.c                           | 2 +-
 generator/OCaml.ml                                    | 2 +-
 generator/erlang.ml                                   | 6 +++---
 generator/fish.ml                                     | 4 ++--
 generator/java.ml                                     | 2 +-
 generator/lua.ml                                      | 2 +-
 generator/php.ml                                      | 2 +-
 generator/python.ml                                   | 2 +-
 generator/ruby.ml                                     | 2 +-
 generator/tests_c_api.ml                              | 2 +-
 java/handle.c                                         | 2 +-
 lib/Makefile.am                                       | 2 +-
 lib/guestfs-internal-all.h                            | 9 ++++-----
 lib/guestfs-internal.h                                | 5 ++---
 lib/unit-tests.c                                      | 2 +-
 make-fs/make-fs.c                                     | 2 +-
 mllib/getopt-c.c                                      | 2 +-
 mllib/uri-c.c                                         | 2 +-
 ocaml/guestfs-c.c                                     | 2 +-
 p2v/p2v.h                                             | 4 ++--
 python/MANIFEST.in                                    | 4 ++--
 python/Makefile.am                                    | 8 ++++----
 rescue/escape.c                                       | 2 +-
 rescue/rescue.c                                       | 2 +-
 rescue/suggest.c                                      | 2 +-
 test-tool/test-tool.c                                 | 2 +-
 tests/c-api/test-add-drive-opts.c                     | 2 +-
 tests/c-api/test-add-libvirt-dom.c                    | 2 +-
 tests/c-api/test-backend-settings.c                   | 2 +-
 tests/c-api/test-config.c                             | 2 +-
 tests/c-api/test-create-handle.c                      | 2 +-
 tests/c-api/test-debug-to-file.c                      | 2 +-
 tests/c-api/test-environment.c                        | 2 +-
 tests/c-api/test-event-string.c                       | 2 +-
 tests/c-api/test-last-errno.c                         | 2 +-
 tests/c-api/test-private-data.c                       | 2 +-
 tests/c-api/test-user-cancel.c                        | 2 +-
 tests/c-api/tests-main.c                              | 2 +-
 tests/charsets/test-charset-fidelity.c                | 2 +-
 tests/disks/test-add-disks.c                          | 2 +-
 tests/events/test-libvirt-auth-callbacks.c            | 2 +-
 tests/mount-local/test-parallel-mount-local.c         | 2 +-
 tests/parallel/test-parallel.c                        | 2 +-
 tests/regressions/rhbz1055452.c                       | 2 +-
 tests/regressions/rhbz501893.c                        | 2 +-
 tests/regressions/rhbz790721.c                        | 2 +-
 tests/regressions/rhbz914931.c                        | 2 +-
 tests/regressions/test-big-heap.c                     | 2 +-
 utils/boot-analysis/boot-analysis-timeline.c          | 2 +-
 utils/boot-analysis/boot-analysis-utils.c             | 2 +-
 utils/boot-analysis/boot-analysis.c                   | 2 +-
 utils/boot-benchmark/boot-benchmark.c                 | 2 +-
 utils/qemu-boot/qemu-boot.c                           | 2 +-
 utils/qemu-speed-test/qemu-speed-test.c               | 2 +-
 v2v/libvirt_utils-c.c                                 | 2 +-
 77 files changed, 91 insertions(+), 93 deletions(-)

diff --git a/.gitignore b/.gitignore
index b20b5f5b8..ec332bc32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -500,7 +500,6 @@ Makefile.in
 /python/guestfs.pyc
 /python/guestfs.pyo
 /python/guestfs-internal-all.h
-/python/guestfs-internal-frontend.h
 /python/ignore-value.h
 /python/MANIFEST
 /python/module.c
@@ -511,6 +510,7 @@ Makefile.in
 /python/stamp-extra-files
 /python/t/tests_helper.py
 /python/utils.c
+/python/utils.h
 /qemu-wrapper.sh
 /rescue/stamp-virt-rescue.pod
 /rescue/virt-rescue
diff --git a/builder/index-validate.c b/builder/index-validate.c
index 224cd674a..a830ad8c6 100644
--- a/builder/index-validate.c
+++ b/builder/index-validate.c
@@ -31,7 +31,7 @@
 #include <guestfs.h>

 #include "getprogname.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "index-struct.h"
 #include "index-parse.h"
diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c
index ef37849ed..296d0d170 100644
--- a/builder/pxzcat-c.c
+++ b/builder/pxzcat-c.c
@@ -36,7 +36,7 @@
 #include <caml/mlvalues.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"

diff --git a/common/edit/file-edit.c b/common/edit/file-edit.c
index b0347e78f..3c09d1985 100644
--- a/common/edit/file-edit.c
+++ b/common/edit/file-edit.c
@@ -41,7 +41,7 @@
 #include <utime.h>
 #include <sys/wait.h>

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "file-edit.h"

diff --git a/common/mlutils/c_utils-c.c b/common/mlutils/c_utils-c.c
index 32edbd4a7..b8ccee0af 100644
--- a/common/mlutils/c_utils-c.c
+++ b/common/mlutils/c_utils-c.c
@@ -36,7 +36,7 @@ extern void unix_error (int errcode, char * cmdname, value
arg) Noreturn;
 #endif

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #pragma GCC diagnostic ignored "-Wmissing-prototypes"

diff --git a/common/options/options.h b/common/options/options.h
index 6bf2c5863..7eafa73e4 100644
--- a/common/options/options.h
+++ b/common/options/options.h
@@ -23,7 +23,7 @@

 #include <stdbool.h>

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 /* Provided by guestfish or guestmount. */
 extern guestfs_h *g;
diff --git a/common/options/uri.c b/common/options/uri.c
index e7ba7a51a..a6a315dc7 100644
--- a/common/options/uri.c
+++ b/common/options/uri.c
@@ -37,7 +37,7 @@
 #include "getprogname.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "uri.h"

 static int is_uri (const char *arg);
diff --git a/common/parallel/domains.c b/common/parallel/domains.c
index d5d3ae9a1..a3431bd76 100644
--- a/common/parallel/domains.c
+++ b/common/parallel/domains.c
@@ -41,7 +41,7 @@
 #endif

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "domains.h"

 #if defined(HAVE_LIBVIRT)
diff --git a/common/parallel/estimate-max-threads.c
b/common/parallel/estimate-max-threads.c
index 27ed80db9..44f3b53a3 100644
--- a/common/parallel/estimate-max-threads.c
+++ b/common/parallel/estimate-max-threads.c
@@ -26,7 +26,7 @@
 #include <libintl.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "estimate-max-threads.h"

 static char *read_line_from (const char *cmd);
diff --git a/common/parallel/parallel.c b/common/parallel/parallel.c
index 97b9a3a0c..0e9fadcca 100644
--- a/common/parallel/parallel.c
+++ b/common/parallel/parallel.c
@@ -47,7 +47,7 @@
 #include "getprogname.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "options.h"
 #include "domains.h"
 #include "estimate-max-threads.h"
diff --git a/common/progress/progress.c b/common/progress/progress.c
index 20c15eab4..79b137fef 100644
--- a/common/progress/progress.c
+++ b/common/progress/progress.c
@@ -32,7 +32,7 @@
 #include <langinfo.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "progress.h"

diff --git a/common/utils/Makefile.am b/common/utils/Makefile.am
index 9aabda4e2..49e0bc617 100644
--- a/common/utils/Makefile.am
+++ b/common/utils/Makefile.am
@@ -21,7 +21,7 @@ noinst_LTLIBRARIES = libutils.la

 libutils_la_SOURCES = \
 	../../lib/guestfs.h \
-	guestfs-internal-frontend.h \
+	utils.h \
 	utils.c
 libutils_la_CPPFLAGS = \
 	-DGUESTFS_WARN_DEPRECATED=1 \
diff --git a/common/utils/utils.c b/common/utils/utils.c
index 4ac214ded..35f1c08a6 100644
--- a/common/utils/utils.c
+++ b/common/utils/utils.c
@@ -47,7 +47,7 @@

 /* NB: MUST NOT include "guestfs-internal.h". */
 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 void
 guestfs_int_free_string_list (char **argv)
diff --git a/common/utils/guestfs-internal-frontend.h b/common/utils/utils.h
similarity index 97%
rename from common/utils/guestfs-internal-frontend.h
rename to common/utils/utils.h
index 8de38bf9b..8ea1fb37b 100644
--- a/common/utils/guestfs-internal-frontend.h
+++ b/common/utils/utils.h
@@ -29,8 +29,8 @@
  * B<not> be here!
  */

-#ifndef GUESTFS_INTERNAL_FRONTEND_H_
-#define GUESTFS_INTERNAL_FRONTEND_H_
+#ifndef GUESTFS_UTILS_H_
+#define GUESTFS_UTILS_H_

 #include <stdbool.h>

@@ -111,4 +111,4 @@ extern void guestfs_int_cleanup_free_string_list (char
***ptr);
       fputs ("\033[0m", (fp));                   \
   } while (0)

-#endif /* GUESTFS_INTERNAL_FRONTEND_H_ */
+#endif /* GUESTFS_UTILS_H_ */
diff --git a/common/visit/visit.c b/common/visit/visit.c
index 491f9dda3..454191d0c 100644
--- a/common/visit/visit.c
+++ b/common/visit/visit.c
@@ -36,7 +36,7 @@
 #include "getprogname.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "structs-cleanups.h"

 #include "visit.h"
diff --git a/common/windows/windows.c b/common/windows/windows.c
index 1fd94e0e6..b9269a794 100644
--- a/common/windows/windows.c
+++ b/common/windows/windows.c
@@ -34,7 +34,7 @@
 #include <langinfo.h>
 #include <libintl.h>

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "c-ctype.h"

diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES
index e856ffda0..99de982a6 100644
--- a/docs/C_SOURCE_FILES
+++ b/docs/C_SOURCE_FILES
@@ -53,8 +53,8 @@ common/structs/structs-cleanups.c
 common/structs/structs-cleanups.h
 common/structs/structs-print.c
 common/structs/structs-print.h
-common/utils/guestfs-internal-frontend.h
 common/utils/utils.c
+common/utils/utils.h
 common/visit/visit.c
 common/visit/visit.h
 common/windows/windows.c
diff --git a/erlang/main.c b/erlang/main.c
index 54df4822f..4e22e3aa0 100644
--- a/erlang/main.c
+++ b/erlang/main.c
@@ -36,7 +36,7 @@ instead of erl_interface.
 #include "full-write.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 guestfs_h *g;

diff --git a/fish/fish.h b/fish/fish.h
index df22e34e7..b858b9bf1 100644
--- a/fish/fish.h
+++ b/fish/fish.h
@@ -21,7 +21,7 @@

 #include <guestfs.h>

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "fish-cmds.h"

diff --git a/fuse/guestunmount.c b/fuse/guestunmount.c
index 2b2c493f8..5938b8a71 100644
--- a/fuse/guestunmount.c
+++ b/fuse/guestunmount.c
@@ -35,7 +35,7 @@
 #include <sys/wait.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"
 #include "getprogname.h"
diff --git a/fuse/test-fuse.c b/fuse/test-fuse.c
index 546c08a0b..c7b6881a4 100644
--- a/fuse/test-fuse.c
+++ b/fuse/test-fuse.c
@@ -50,7 +50,7 @@
 #endif

 #include <guestfs.h>
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"

diff --git a/fuse/test-guestmount-fd.c b/fuse/test-guestmount-fd.c
index abef7b293..63ac8c1d8 100644
--- a/fuse/test-guestmount-fd.c
+++ b/fuse/test-guestmount-fd.c
@@ -33,7 +33,7 @@
 #include "getprogname.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #define GUESTMOUNT_BINARY "guestmount"
 #define GUESTUNMOUNT_BINARY "guestunmount"
diff --git a/fuse/test-guestunmount-fd.c b/fuse/test-guestunmount-fd.c
index 6756f18cb..4daa72de4 100644
--- a/fuse/test-guestunmount-fd.c
+++ b/fuse/test-guestunmount-fd.c
@@ -36,7 +36,7 @@
 #include "ignore-value.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/generator/OCaml.ml b/generator/OCaml.ml
index f6a4292b9..d3929475a 100644
--- a/generator/OCaml.ml
+++ b/generator/OCaml.ml
@@ -425,7 +425,7 @@ and generate_ocaml_c ()  #include <caml/signals.h>

 #include <guestfs.h>
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #include \"guestfs-c.h\"

diff --git a/generator/erlang.ml b/generator/erlang.ml
index 03cca3368..a0e295768 100644
--- a/generator/erlang.ml
+++ b/generator/erlang.ml
@@ -254,7 +254,7 @@ instead of erl_interface.
 */

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #include \"actions.h\"
 ";
@@ -344,7 +344,7 @@ instead of erl_interface.
 */

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #include \"actions.h\"
 ";
@@ -535,7 +535,7 @@ instead of erl_interface.
 */

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #include \"actions.h\"

diff --git a/generator/fish.ml b/generator/fish.ml
index 3d99c9081..c09423b79 100644
--- a/generator/fish.ml
+++ b/generator/fish.ml
@@ -99,7 +99,7 @@ let generate_fish_run_cmds actions ()    pr "#include
\"getprogname.h\"\n";
   pr "\n";
   pr "#include \"guestfs.h\"\n";
-  pr "#include \"guestfs-internal-frontend.h\"\n";
+  pr "#include \"utils.h\"\n";
   pr "#include \"structs-print.h\"\n";
   pr "\n";
   pr "#include \"fish.h\"\n";
@@ -607,7 +607,7 @@ let generate_fish_cmds ()    pr "#include
<errno.h>\n";
   pr "\n";
   pr "#include \"guestfs.h\"\n";
-  pr "#include \"guestfs-internal-frontend.h\"\n";
+  pr "#include \"utils.h\"\n";
   pr "#include \"structs-print.h\"\n";
   pr "\n";
   pr "#include \"fish.h\"\n";
diff --git a/generator/java.ml b/generator/java.ml
index a7d0ed359..6a3b09992 100644
--- a/generator/java.ml
+++ b/generator/java.ml
@@ -585,7 +585,7 @@ and generate_java_c actions ()
 #include \"com_redhat_et_libguestfs_GuestFS.h\"
 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"
 #include \"structs-cleanups.h\"

 /* Note that this function returns.  The exception is not thrown
diff --git a/generator/lua.ml b/generator/lua.ml
index b40c51753..c76e429b5 100644
--- a/generator/lua.ml
+++ b/generator/lua.ml
@@ -64,7 +64,7 @@ let generate_lua_c ()  #endif

 #include <guestfs.h>
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #define GUESTFS_LUA_HANDLE \"guestfs handle\"

diff --git a/generator/php.ml b/generator/php.ml
index 0721e431a..7c6caae6b 100644
--- a/generator/php.ml
+++ b/generator/php.ml
@@ -90,7 +90,7 @@ and generate_php_c ()  #include <php_guestfs_php.h>

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\" /* Only for
POINTER_NOT_IMPLEMENTED */
+#include \"utils.h\" /* Only for POINTER_NOT_IMPLEMENTED */

 static int res_guestfs_h;

diff --git a/generator/python.ml b/generator/python.ml
index c6c237241..20bab0312 100644
--- a/generator/python.ml
+++ b/generator/python.ml
@@ -42,7 +42,7 @@ let rec generate_python_actions_h ()  #define
GUESTFS_PYTHON_ACTIONS_H_

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"

 #if PY_VERSION_HEX < 0x02050000
 typedef int Py_ssize_t;
diff --git a/generator/ruby.ml b/generator/ruby.ml
index 825cab32a..75a93398d 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -55,7 +55,7 @@ let rec generate_ruby_h ()  #endif

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\" /* Only for
POINTER_NOT_IMPLEMENTED */
+#include \"utils.h\" /* Only for POINTER_NOT_IMPLEMENTED */

 #include \"extconf.h\"

diff --git a/generator/tests_c_api.ml b/generator/tests_c_api.ml
index c3cb62c4d..ba4647ab3 100644
--- a/generator/tests_c_api.ml
+++ b/generator/tests_c_api.ml
@@ -47,7 +47,7 @@ let rec generate_c_api_tests ()  #include <errno.h>

 #include \"guestfs.h\"
-#include \"guestfs-internal-frontend.h\"
+#include \"utils.h\"
 #include \"structs-cleanups.h\"

 #include \"tests.h\"
diff --git a/java/handle.c b/java/handle.c
index 0993f33ed..9080caaf4 100644
--- a/java/handle.c
+++ b/java/handle.c
@@ -25,7 +25,7 @@

 #include "com_redhat_et_libguestfs_GuestFS.h"
 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 /* This is the opaque data passed between _set_event_callback and
  * the C wrapper which calls the Java event callback.
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 9cca1268a..b1cb39105 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -57,7 +57,7 @@ libguestfs_la_SOURCES = \
 	../common/errnostring/errnostring.h \
 	../common/protocol/guestfs_protocol.h \
 	../common/qemuopts/qemuopts.h \
-	../common/utils/guestfs-internal-frontend.h \
+	../common/utils/utils.h \
 	../common/structs/structs-cleanups.h \
 	guestfs.h \
 	guestfs-internal.h \
diff --git a/lib/guestfs-internal-all.h b/lib/guestfs-internal-all.h
index bf87b8295..e7ffd1826 100644
--- a/lib/guestfs-internal-all.h
+++ b/lib/guestfs-internal-all.h
@@ -22,11 +22,10 @@
  * tools (ie. I<all> C code).
  *
  * If you need a definition used by only the library, put it in
- * F<lib/guestfs-internal.h> instead.  If you need a definition used
- * by only the frontend (non-daemon) parts of libguestfs, try
- * F<lib/guestfs-internal-frontend.h>.  If a definition is used by
- * only a single tool, it should not be in any shared header file at
- * all.
+ * F<lib/guestfs-internal.h> instead.
+ *
+ * If a definition is used by only a single tool, it should not be in
+ * any shared header file at all.
  */

 #ifndef GUESTFS_INTERNAL_ALL_H_
diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h
index 190b5cdd2..b1c3db5ff 100644
--- a/lib/guestfs-internal.h
+++ b/lib/guestfs-internal.h
@@ -20,8 +20,7 @@
  * This header file is included in the libguestfs library (F<lib/>)
  * only.
  *
- * See also F<lib/guestfs-internal-frontend.h> and
- * F<lib/guestfs-internal-all.h>
+ * See also F<lib/guestfs-internal-all.h>.
  */

 #ifndef GUESTFS_INTERNAL_H_
@@ -55,7 +54,7 @@

 #include "hash.h"

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #if ENABLE_PROBES
 #include <sys/sdt.h>
diff --git a/lib/unit-tests.c b/lib/unit-tests.c
index d44bc41e0..a9ba4cbc2 100644
--- a/lib/unit-tests.c
+++ b/lib/unit-tests.c
@@ -38,7 +38,7 @@

 #include "guestfs.h"
 #include "guestfs-internal.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 /**
  * Test C<guestfs_int_split_string>.
diff --git a/make-fs/make-fs.c b/make-fs/make-fs.c
index e30745a0f..103dbebd1 100644
--- a/make-fs/make-fs.c
+++ b/make-fs/make-fs.c
@@ -35,7 +35,7 @@
 #include <sys/wait.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "xstrtol.h"
 #include "getprogname.h"
diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c
index d2d98768c..7b9af5958 100644
--- a/mllib/getopt-c.c
+++ b/mllib/getopt-c.c
@@ -40,7 +40,7 @@
 #include <caml/callback.h>
 #include <caml/printexc.h>

-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 extern value guestfs_int_mllib_getopt_parse (value argsv, value specsv, value
anon_funv, value usage_msgv);

diff --git a/mllib/uri-c.c b/mllib/uri-c.c
index ffb55306b..592d09939 100644
--- a/mllib/uri-c.c
+++ b/mllib/uri-c.c
@@ -31,7 +31,7 @@
 #include <caml/mlvalues.h>

 #include <guestfs.h>
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "uri.h"

 extern value guestfs_int_mllib_parse_uri (value argv);
diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c
index 0df57758d..94288f464 100644
--- a/ocaml/guestfs-c.c
+++ b/ocaml/guestfs-c.c
@@ -23,7 +23,7 @@
 #include <errno.h>

 #include <guestfs.h>
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include <caml/config.h>
 #include <caml/alloc.h>
diff --git a/p2v/p2v.h b/p2v/p2v.h
index be913c024..1b225db6f 100644
--- a/p2v/p2v.h
+++ b/p2v/p2v.h
@@ -32,10 +32,10 @@
 /* We don't use libguestfs directly here, and we don't link to it
  * either (in fact, we don't want libguestfs on the ISO).  However
  * we include this just so that we can use the convenience macros in
- * guestfs-internal-frontend.h.
+ * utils.h.
  */
 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 /* Ensure we don't use libguestfs. */
 #define guestfs_h DO_NOT_USE
diff --git a/python/MANIFEST.in b/python/MANIFEST.in
index 116367d16..69db7e5ce 100644
--- a/python/MANIFEST.in
+++ b/python/MANIFEST.in
@@ -17,8 +17,8 @@

 include actions.h
 include c-ctype.h
+include cleanups.h
 include config.h
 include guestfs-internal-all.h
-include guestfs-internal-frontend-cleanups.h
-include guestfs-internal-frontend.h
+include utils.h
 include ignore-value.h
diff --git a/python/Makefile.am b/python/Makefile.am
index fd0825648..d0f324785 100644
--- a/python/Makefile.am
+++ b/python/Makefile.am
@@ -102,7 +102,7 @@ stamp-extra-files: \
 	  cleanups.h \
 	  config.h \
 	  guestfs-internal-all.h \
-	  guestfs-internal-frontend.h \
+	  utils.h \
 	  ignore-value.h \
 	  stdlib-cleanups.c \
 	  utils.c
@@ -123,8 +123,8 @@ ignore-value.h:
 guestfs-internal-all.h:
 	ln $(top_srcdir)/lib/guestfs-internal-all.h $@

-guestfs-internal-frontend.h:
-	ln $(top_srcdir)/common/utils/guestfs-internal-frontend.h $@
+utils.h:
+	ln $(top_srcdir)/common/utils/utils.h $@

 stdlib-cleanups.c:
 	ln $(top_srcdir)/common/cleanups/stdlib-cleanups.c $@
@@ -153,7 +153,7 @@ CLEANFILES += \
 	config.h \
 	guestfs-internal-all.h \
 	guestfs-internal-frontend-cleanups.h \
-	guestfs-internal-frontend.h \
+	utils.h \
 	ignore-value.h \
 	stamp-extra-files \
 	utils.c
diff --git a/rescue/escape.c b/rescue/escape.c
index f7f7d84c4..a60c6b9db 100644
--- a/rescue/escape.c
+++ b/rescue/escape.c
@@ -30,7 +30,7 @@
 #include "c-ctype.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "rescue.h"

diff --git a/rescue/rescue.c b/rescue/rescue.c
index 25bd55077..901a864a3 100644
--- a/rescue/rescue.c
+++ b/rescue/rescue.c
@@ -40,7 +40,7 @@
 #include "xvasprintf.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "windows.h"
 #include "options.h"
diff --git a/rescue/suggest.c b/rescue/suggest.c
index f32bb83c7..d9903c33a 100644
--- a/rescue/suggest.c
+++ b/rescue/suggest.c
@@ -25,7 +25,7 @@
 #include <libintl.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "options.h"

diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index 2d63b4f4e..106ce399b 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -36,7 +36,7 @@
 #include <libintl.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"

diff --git a/tests/c-api/test-add-drive-opts.c
b/tests/c-api/test-add-drive-opts.c
index 4f39e2690..504e7024d 100644
--- a/tests/c-api/test-add-drive-opts.c
+++ b/tests/c-api/test-add-drive-opts.c
@@ -26,7 +26,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-add-libvirt-dom.c
b/tests/c-api/test-add-libvirt-dom.c
index 672e8612f..fb841350c 100644
--- a/tests/c-api/test-add-libvirt-dom.c
+++ b/tests/c-api/test-add-libvirt-dom.c
@@ -31,7 +31,7 @@
 #include "xgetcwd.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 static void
 make_test_xml (FILE *fp, const char *cwd)
diff --git a/tests/c-api/test-backend-settings.c
b/tests/c-api/test-backend-settings.c
index 371a24776..d639579ca 100644
--- a/tests/c-api/test-backend-settings.c
+++ b/tests/c-api/test-backend-settings.c
@@ -29,7 +29,7 @@
 #include <assert.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-config.c b/tests/c-api/test-config.c
index fef6c64e5..c8ed83cc7 100644
--- a/tests/c-api/test-config.c
+++ b/tests/c-api/test-config.c
@@ -26,7 +26,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-create-handle.c b/tests/c-api/test-create-handle.c
index 170649926..3fa6f1633 100644
--- a/tests/c-api/test-create-handle.c
+++ b/tests/c-api/test-create-handle.c
@@ -26,7 +26,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-debug-to-file.c b/tests/c-api/test-debug-to-file.c
index 10e36c63b..1e5330c64 100644
--- a/tests/c-api/test-debug-to-file.c
+++ b/tests/c-api/test-debug-to-file.c
@@ -30,7 +30,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"

diff --git a/tests/c-api/test-environment.c b/tests/c-api/test-environment.c
index d5a03d4fb..f5d4642eb 100644
--- a/tests/c-api/test-environment.c
+++ b/tests/c-api/test-environment.c
@@ -31,7 +31,7 @@
 #include <assert.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-event-string.c b/tests/c-api/test-event-string.c
index e94000d0a..8cbd1220f 100644
--- a/tests/c-api/test-event-string.c
+++ b/tests/c-api/test-event-string.c
@@ -27,7 +27,7 @@
 #include <assert.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-last-errno.c b/tests/c-api/test-last-errno.c
index acd5cd97d..113bdd84f 100644
--- a/tests/c-api/test-last-errno.c
+++ b/tests/c-api/test-last-errno.c
@@ -31,7 +31,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/c-api/test-private-data.c b/tests/c-api/test-private-data.c
index 9ebe7a892..88752e585 100644
--- a/tests/c-api/test-private-data.c
+++ b/tests/c-api/test-private-data.c
@@ -29,7 +29,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #define PREFIX "test_"

diff --git a/tests/c-api/test-user-cancel.c b/tests/c-api/test-user-cancel.c
index d429a0fe3..d7c1dfe3d 100644
--- a/tests/c-api/test-user-cancel.c
+++ b/tests/c-api/test-user-cancel.c
@@ -48,7 +48,7 @@
 #include "cloexec.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 static const off_t filesize = 1024*1024*1024;

diff --git a/tests/c-api/tests-main.c b/tests/c-api/tests-main.c
index f202a70ff..171376a12 100644
--- a/tests/c-api/tests-main.c
+++ b/tests/c-api/tests-main.c
@@ -37,7 +37,7 @@
 #define GUESTFS_WARN_DEPRECATED 1

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "structs-cleanups.h"

 #include "tests.h"
diff --git a/tests/charsets/test-charset-fidelity.c
b/tests/charsets/test-charset-fidelity.c
index 952256edd..04956d75e 100644
--- a/tests/charsets/test-charset-fidelity.c
+++ b/tests/charsets/test-charset-fidelity.c
@@ -31,7 +31,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "getprogname.h"

diff --git a/tests/disks/test-add-disks.c b/tests/disks/test-add-disks.c
index b968bd352..91a120316 100644
--- a/tests/disks/test-add-disks.c
+++ b/tests/disks/test-add-disks.c
@@ -34,7 +34,7 @@
 #include <assert.h>

 #include <guestfs.h>
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "getprogname.h"

diff --git a/tests/events/test-libvirt-auth-callbacks.c
b/tests/events/test-libvirt-auth-callbacks.c
index a18ab2429..11f31f294 100644
--- a/tests/events/test-libvirt-auth-callbacks.c
+++ b/tests/events/test-libvirt-auth-callbacks.c
@@ -28,7 +28,7 @@
 #include <libvirt/libvirt.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #define EXPECT_OK 1
 #define EXPECT_FAIL -1
diff --git a/tests/mount-local/test-parallel-mount-local.c
b/tests/mount-local/test-parallel-mount-local.c
index 542f1ed3d..2d1c35368 100644
--- a/tests/mount-local/test-parallel-mount-local.c
+++ b/tests/mount-local/test-parallel-mount-local.c
@@ -38,7 +38,7 @@
 #include <pthread.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "estimate-max-threads.h"

 #include "ignore-value.h"
diff --git a/tests/parallel/test-parallel.c b/tests/parallel/test-parallel.c
index 276340e4b..437535791 100644
--- a/tests/parallel/test-parallel.c
+++ b/tests/parallel/test-parallel.c
@@ -36,7 +36,7 @@
 #include <pthread.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "ignore-value.h"
 #include "getprogname.h"
diff --git a/tests/regressions/rhbz1055452.c b/tests/regressions/rhbz1055452.c
index 79cd54033..d00a40a8f 100644
--- a/tests/regressions/rhbz1055452.c
+++ b/tests/regressions/rhbz1055452.c
@@ -33,7 +33,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/regressions/rhbz501893.c b/tests/regressions/rhbz501893.c
index b763a107b..fc6a9e63a 100644
--- a/tests/regressions/rhbz501893.c
+++ b/tests/regressions/rhbz501893.c
@@ -24,7 +24,7 @@
 #include <assert.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/tests/regressions/rhbz790721.c b/tests/regressions/rhbz790721.c
index 2dfcd2768..778b68ccf 100644
--- a/tests/regressions/rhbz790721.c
+++ b/tests/regressions/rhbz790721.c
@@ -43,7 +43,7 @@
 #include <pthread.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "getprogname.h"

diff --git a/tests/regressions/rhbz914931.c b/tests/regressions/rhbz914931.c
index bfc8f83ea..26c24e7db 100644
--- a/tests/regressions/rhbz914931.c
+++ b/tests/regressions/rhbz914931.c
@@ -32,7 +32,7 @@
 #include <error.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "getprogname.h"

diff --git a/tests/regressions/test-big-heap.c
b/tests/regressions/test-big-heap.c
index 1cbf8d23c..012c5b803 100644
--- a/tests/regressions/test-big-heap.c
+++ b/tests/regressions/test-big-heap.c
@@ -33,7 +33,7 @@
 #include <assert.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 int
 main (int argc, char *argv[])
diff --git a/utils/boot-analysis/boot-analysis-timeline.c
b/utils/boot-analysis/boot-analysis-timeline.c
index 8198c5677..98150bf64 100644
--- a/utils/boot-analysis/boot-analysis-timeline.c
+++ b/utils/boot-analysis/boot-analysis-timeline.c
@@ -33,7 +33,7 @@
 #include "ignore-value.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "boot-analysis.h"

diff --git a/utils/boot-analysis/boot-analysis-utils.c
b/utils/boot-analysis/boot-analysis-utils.c
index 4308bead3..faf2c5bc6 100644
--- a/utils/boot-analysis/boot-analysis-utils.c
+++ b/utils/boot-analysis/boot-analysis-utils.c
@@ -27,7 +27,7 @@
 #include "ignore-value.h"

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "boot-analysis-utils.h"

diff --git a/utils/boot-analysis/boot-analysis.c
b/utils/boot-analysis/boot-analysis.c
index 1bec9a57b..2bd866182 100644
--- a/utils/boot-analysis/boot-analysis.c
+++ b/utils/boot-analysis/boot-analysis.c
@@ -40,7 +40,7 @@
 #include <pthread.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "boot-analysis.h"
 #include "boot-analysis-utils.h"
diff --git a/utils/boot-benchmark/boot-benchmark.c
b/utils/boot-benchmark/boot-benchmark.c
index 4af394387..b07543e37 100644
--- a/utils/boot-benchmark/boot-benchmark.c
+++ b/utils/boot-benchmark/boot-benchmark.c
@@ -34,7 +34,7 @@
 #include <math.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "boot-analysis-utils.h"

diff --git a/utils/qemu-boot/qemu-boot.c b/utils/qemu-boot/qemu-boot.c
index 68818358b..b34b4898a 100644
--- a/utils/qemu-boot/qemu-boot.c
+++ b/utils/qemu-boot/qemu-boot.c
@@ -36,7 +36,7 @@
 #include <pthread.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"
 #include "estimate-max-threads.h"

 #include "getprogname.h"
diff --git a/utils/qemu-speed-test/qemu-speed-test.c
b/utils/qemu-speed-test/qemu-speed-test.c
index 5aa663c14..59193e52a 100644
--- a/utils/qemu-speed-test/qemu-speed-test.c
+++ b/utils/qemu-speed-test/qemu-speed-test.c
@@ -39,7 +39,7 @@
 #include <sys/time.h>

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #include "getprogname.h"

diff --git a/v2v/libvirt_utils-c.c b/v2v/libvirt_utils-c.c
index 98ed30e06..54ba6fb48 100644
--- a/v2v/libvirt_utils-c.c
+++ b/v2v/libvirt_utils-c.c
@@ -41,7 +41,7 @@
 #endif

 #include "guestfs.h"
-#include "guestfs-internal-frontend.h"
+#include "utils.h"

 #pragma GCC diagnostic ignored "-Wmissing-prototypes"

--
2.13.0