Skip to content

Commit

Permalink
nbd: publish _lookup functions
Browse files Browse the repository at this point in the history
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 <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
  • Loading branch information
Vladimir Sementsov-Ogievskiy authored and ebblake committed Jan 4, 2019
1 parent 9b2e891 commit 757a0d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions include/block/nbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 0 additions & 5 deletions nbd/nbd-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 757a0d0

Please sign in to comment.