From 9dc089506f5893e309c458e5466566d112a7bb62 Mon Sep 17 00:00:00 2001 From: John Snow Date: Wed, 27 Mar 2019 17:22:17 +0100 Subject: [PATCH 078/163] nbd: publish _lookup functions RH-Author: John Snow Message-id: <20190327172308.31077-5-jsnow@redhat.com> Patchwork-id: 85172 O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 04/55] nbd: publish _lookup functions Bugzilla: 1691009 RH-Acked-by: Stefan Hajnoczi RH-Acked-by: Max Reitz RH-Acked-by: Miroslav Rezanina From: Vladimir Sementsov-Ogievskiy These functions are used for formatting pretty trace points. We are going to add some in block/nbd-client, so, let's publish all these functions at once. Note, that nbd_reply_type_lookup is already published, and constants, "named" by these functions live in include/block/nbd.h too. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20181102151152.288399-3-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake (cherry picked from commit 757a0d05ea22d63e667db08a80b6ec6f1d53a12f) Signed-off-by: John Snow Signed-off-by: Miroslav Rezanina --- include/block/nbd.h | 5 +++++ nbd/nbd-internal.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/block/nbd.h b/include/block/nbd.h index 6a5bfe5..65402d3 100644 --- a/include/block/nbd.h +++ b/include/block/nbd.h @@ -343,5 +343,10 @@ static inline bool nbd_reply_is_structured(NBDReply *reply) } const char *nbd_reply_type_lookup(uint16_t type); +const char *nbd_opt_lookup(uint32_t opt); +const char *nbd_rep_lookup(uint32_t rep); +const char *nbd_info_lookup(uint16_t info); +const char *nbd_cmd_lookup(uint16_t info); +const char *nbd_err_lookup(int err); #endif diff --git a/nbd/nbd-internal.h b/nbd/nbd-internal.h index eeff78d..f38be9e 100644 --- a/nbd/nbd-internal.h +++ b/nbd/nbd-internal.h @@ -100,11 +100,6 @@ struct NBDTLSHandshakeData { void nbd_tls_handshake(QIOTask *task, void *opaque); -const char *nbd_opt_lookup(uint32_t opt); -const char *nbd_rep_lookup(uint32_t rep); -const char *nbd_info_lookup(uint16_t info); -const char *nbd_cmd_lookup(uint16_t info); -const char *nbd_err_lookup(int err); int nbd_drop(QIOChannel *ioc, size_t size, Error **errp); -- 1.8.3.1