nbd: Let client skip portions of server reply
commit7d3123e1775f16bf23fa8d5bac17a3d8a9e72583
authorEric Blake <eblake@redhat.com>
Fri, 14 Oct 2016 18:33:12 +0000 (14 13:33 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Nov 2016 08:28:55 +0000 (2 09:28 +0100)
treee2f3a91f15673460b020beec040e673efd0055cc
parent2cdbf41362cbc9b977dd458b6508352e45f2cb42
nbd: Let client skip portions of server reply

The server has a nice helper function nbd_negotiate_drop_sync()
which lets it easily ignore fluff from the client (such as the
payload to an unknown option request).  We can't quite make it
common, since it depends on nbd_negotiate_read() which handles
coroutine magic, but we can copy the idea into the client where
we have places where we want to ignore data (such as the
description tacked on the end of NBD_REP_SERVER).

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1476469998-28592-11-git-send-email-eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
nbd/client.c