In preparation for installing this header as a common public header
for use by other projects, rename it.
---
common/protocol/Makefile.am | 10 +++++-----
common/protocol/{protocol.h => nbd-protocol.h} | 6 +++---
common/protocol/protostrings.sed | 6 +++---
plugins/nbd/nbd-standalone.c | 2 +-
server/protocol-handshake-newstyle.c | 2 +-
server/protocol-handshake-oldstyle.c | 2 +-
server/protocol-handshake.c | 2 +-
server/protocol.c | 2 +-
tests/test-layers.c | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/common/protocol/Makefile.am b/common/protocol/Makefile.am
index 99df43b..996be26 100644
--- a/common/protocol/Makefile.am
+++ b/common/protocol/Makefile.am
@@ -32,7 +32,7 @@
include $(top_srcdir)/common-rules.mk
EXTRA_DIST = \
- protocol.h \
+ nbd-protocol.h \
protostrings.c \
protostrings.sed \
$(NULL)
@@ -41,16 +41,16 @@ noinst_LTLIBRARIES = libprotocol.la
libprotocol_la_SOURCES = \
protostrings.c \
- protocol.h \
+ nbd-protocol.h \
$(NULL)
libprotocol_la_CFLAGS = $(WARNINGS_CFLAGS)
-# protostrings.c is generated from the protocol.h header file where it
-# is used to map NBD protocol flags to strings.
+# protostrings.c is generated from the nbd-protocol.h header file
+# where it is used to map NBD protocol flags to strings.
BUILT_SOURCES = protostrings.c
CLEANFILES += protostrings.c
-protostrings.c: protocol.h protostrings.sed Makefile
+protostrings.c: nbd-protocol.h protostrings.sed Makefile
rm -f $@ $@-t
$(SED) -n -f $(srcdir)/protostrings.sed < $< > $@-t
mv $@-t $@
diff --git a/common/protocol/protocol.h b/common/protocol/nbd-protocol.h
similarity index 99%
rename from common/protocol/protocol.h
rename to common/protocol/nbd-protocol.h
index bf54839..da2e0d0 100644
--- a/common/protocol/protocol.h
+++ b/common/protocol/nbd-protocol.h
@@ -30,8 +30,8 @@
* SUCH DAMAGE.
*/
-#ifndef NBDKIT_PROTOCOL_H
-#define NBDKIT_PROTOCOL_H
+#ifndef NBD_PROTOCOL_H
+#define NBD_PROTOCOL_H
#include <stdint.h>
@@ -244,4 +244,4 @@ extern const char *name_of_nbd_error (int);
#define NBD_ENOTSUP 95
#define NBD_ESHUTDOWN 108
-#endif /* NBDKIT_PROTOCOL_H */
+#endif /* NBD_PROTOCOL_H */
diff --git a/common/protocol/protostrings.sed b/common/protocol/protostrings.sed
index 1731c6b..cb1a76e 100644
--- a/common/protocol/protostrings.sed
+++ b/common/protocol/protostrings.sed
@@ -29,12 +29,12 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
-# Generate the protostrings.c file from protocol.h.
+# Generate the protostrings.c file from nbd-protocol.h.
# Prologue.
1i\
-/* Generated from protocol.h by protostrings.sed. */\
-\#include "protocol.h"\
+/* Generated from nbd-protocol.h by protostrings.sed. */\
+\#include "nbd-protocol.h"\
# Match the precise sections of the source file.
diff --git a/plugins/nbd/nbd-standalone.c b/plugins/nbd/nbd-standalone.c
index 0fabbfe..a6779a4 100644
--- a/plugins/nbd/nbd-standalone.c
+++ b/plugins/nbd/nbd-standalone.c
@@ -53,7 +53,7 @@
#define NBDKIT_API_VERSION 2
#include <nbdkit-plugin.h>
-#include "protocol.h"
+#include "nbd-protocol.h"
#include "byte-swapping.h"
#include "cleanup.h"
diff --git a/server/protocol-handshake-newstyle.c b/server/protocol-handshake-newstyle.c
index 38978c6..866360b 100644
--- a/server/protocol-handshake-newstyle.c
+++ b/server/protocol-handshake-newstyle.c
@@ -41,7 +41,7 @@
#include "internal.h"
#include "byte-swapping.h"
-#include "protocol.h"
+#include "nbd-protocol.h"
/* Maximum number of client options we allow before giving up. */
#define MAX_NR_OPTIONS 32
diff --git a/server/protocol-handshake-oldstyle.c b/server/protocol-handshake-oldstyle.c
index f5425d3..87cb265 100644
--- a/server/protocol-handshake-oldstyle.c
+++ b/server/protocol-handshake-oldstyle.c
@@ -41,7 +41,7 @@
#include "internal.h"
#include "byte-swapping.h"
-#include "protocol.h"
+#include "nbd-protocol.h"
int
protocol_handshake_oldstyle (struct connection *conn)
diff --git a/server/protocol-handshake.c b/server/protocol-handshake.c
index a0d7dc2..2c2f35e 100644
--- a/server/protocol-handshake.c
+++ b/server/protocol-handshake.c
@@ -41,7 +41,7 @@
#include "internal.h"
#include "byte-swapping.h"
-#include "protocol.h"
+#include "nbd-protocol.h"
int
protocol_handshake (struct connection *conn)
diff --git a/server/protocol.c b/server/protocol.c
index e65a078..498db1d 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -45,7 +45,7 @@
#include "internal.h"
#include "byte-swapping.h"
#include "minmax.h"
-#include "protocol.h"
+#include "nbd-protocol.h"
static bool
validate_request (struct connection *conn,
diff --git a/tests/test-layers.c b/tests/test-layers.c
index 9b595c4..1097f15 100644
--- a/tests/test-layers.c
+++ b/tests/test-layers.c
@@ -61,7 +61,7 @@
#include "byte-swapping.h"
#include "cleanup.h"
#include "exit-with-parent.h"
-#include "protocol.h"
+#include "nbd-protocol.h"
/* Declare program_name. */
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1
--
2.23.0