[Libguestfs] [PATCH nbdkit 4/5] protocol: Use new ‘name_of_nbd_opt’ function instead of open-coding.

Richard W.M. Jones rjones at redhat.com
Thu Dec 6 21:50:18 UTC 2018


---
 src/connections.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/connections.c b/src/connections.c
index 410a893..0f99b67 100644
--- a/src/connections.c
+++ b/src/connections.c
@@ -777,7 +777,7 @@ _negotiate_handshake_newstyle_options (struct connection *conn)
 
     case NBD_OPT_INFO:
     case NBD_OPT_GO:
-      optname = option == NBD_OPT_INFO ? "NBD_OPT_INFO" : "NBD_OPT_GO";
+      optname = name_of_nbd_opt (option);
       if (conn->recv (conn, data, optlen) == -1) {
         nbdkit_error ("read: %m");
         return -1;
-- 
2.19.0.rc0




More information about the Libguestfs mailing list