[Libguestfs] [nbdkit PATCH v2 01/17] maint: Rename server/utils.c to server/public.c

Eric Blake eblake at redhat.com
Fri Aug 2 19:26:02 UTC 2019


Otherwise, it gets confusing with the fact that we also have
common/utils/utils.c.

Signed-off-by: Eric Blake <eblake at redhat.com>
---
 server/{utils.c => public.c}           |  4 ++++
 server/{test-utils.c => test-public.c} |  0
 .gitignore                             |  2 +-
 server/Makefile.am                     | 18 +++++++++---------
 4 files changed, 14 insertions(+), 10 deletions(-)
 rename server/{utils.c => public.c} (98%)
 rename server/{test-utils.c => test-public.c} (100%)

diff --git a/server/utils.c b/server/public.c
similarity index 98%
rename from server/utils.c
rename to server/public.c
index 5a2d471a..4b8b1d2b 100644
--- a/server/utils.c
+++ b/server/public.c
@@ -30,6 +30,10 @@
  * SUCH DAMAGE.
  */

+/* This file contains the public utility APIs to be exported by nbdkit
+ * for use by filters and plugins, declared in nbdkit-common.h.
+ */
+
 #include <config.h>

 #include <stdio.h>
diff --git a/server/test-utils.c b/server/test-public.c
similarity index 100%
rename from server/test-utils.c
rename to server/test-public.c
diff --git a/.gitignore b/.gitignore
index 46ab5dc6..bf662193 100644
--- a/.gitignore
+++ b/.gitignore
@@ -66,7 +66,7 @@ Makefile.in
 /server/nbdkit
 /server/nbdkit.pc
 /server/synopsis.c
-/server/test-utils
+/server/test-public
 /stamp-h1
 /tests/disk
 /tests/disk.gz
diff --git a/server/Makefile.am b/server/Makefile.am
index 8f6b0a56..29674866 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -55,13 +55,13 @@ nbdkit_SOURCES = \
 	protocol-handshake.c \
 	protocol-handshake-oldstyle.c \
 	protocol-handshake-newstyle.c \
+	public.c \
 	quit.c \
 	signals.c \
 	socket-activation.c \
 	sockets.c \
 	threadlocal.c \
 	usergroup.c \
-	utils.c \
 	$(top_srcdir)/include/nbdkit-plugin.h \
 	$(top_srcdir)/include/nbdkit-filter.h \
 	$(NULL)
@@ -121,21 +121,21 @@ pkgconfig_DATA = nbdkit.pc

 # Unit testing

-TESTS = test-utils
+TESTS = test-public

-check_PROGRAMS = test-utils
+check_PROGRAMS = test-public

-test_utils_SOURCES = \
-	test-utils.c \
-	utils.c \
+test_public_SOURCES = \
+	test-public.c \
+	public.c \
 	extents.c \
 	$(NULL)
-test_utils_CPPFLAGS = \
+test_public_CPPFLAGS = \
 	-I$(top_srcdir)/include \
 	-I$(top_srcdir)/common/include \
 	-I$(top_srcdir)/common/utils \
 	$(NULL)
-test_utils_CFLAGS = $(WARNINGS_CFLAGS) $(VALGRIND_CFLAGS)
-test_utils_LDADD = \
+test_public_CFLAGS = $(WARNINGS_CFLAGS) $(VALGRIND_CFLAGS)
+test_public_LDADD = \
 	$(top_builddir)/common/utils/libutils.la \
 	$(NULL)
-- 
2.20.1




More information about the Libguestfs mailing list