From f989fbad9b0527925c38f4350190cb1536a4d8c2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 17 May 2016 19:42:35 +0100 Subject: [PATCH 09/10] protocol: Rename NEW_OPTION_REPLY as NBD_REP_MAGIC. To be consistent with qemu's implementation. --- src/connections.c | 2 +- src/protocol.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/connections.c b/src/connections.c index f0a7662..34566b3 100644 --- a/src/connections.c +++ b/src/connections.c @@ -235,7 +235,7 @@ send_newstyle_option_reply (struct connection *conn, { struct fixed_new_option_reply fixed_new_option_reply; - fixed_new_option_reply.magic = htobe64 (NEW_OPTION_REPLY); + fixed_new_option_reply.magic = htobe64 (NBD_REP_MAGIC); fixed_new_option_reply.option = htobe32 (option); fixed_new_option_reply.reply = htobe32 (reply); fixed_new_option_reply.replylen = htobe32 (0); diff --git a/src/protocol.h b/src/protocol.h index de511a6..71a8098 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -67,14 +67,14 @@ struct new_option { /* Fixed newstyle handshake reply message. */ struct fixed_new_option_reply { - uint64_t magic; /* NEW_OPTION_REPLY, network byte order */ + uint64_t magic; /* NBD_REP_MAGIC, network byte order */ uint32_t option; /* option we are replying to */ uint32_t reply; /* NBD_REP_* */ uint32_t replylen; /* we always send zero at the moment */ /* reply data follows, but we currently never send any */ } __attribute__((packed)); -#define NEW_OPTION_REPLY UINT64_C(0x3e889045565a9) +#define NBD_REP_MAGIC UINT64_C(0x3e889045565a9) /* New-style handshake server reply. */ struct new_handshake_finish { -- 2.7.4