yoe/nbd — pull request #11 by reidrac (2013-01-26 13:07:53+00:00)
Title: Detect server disconnection after NBD_OPT_EXPORTNAME

If the export is unknown to the server, it may disconnect (new-style handshake un-fixed). In that case the read call to get export size may return 0 (non error, EOF).

This change fixes following error:

nbd-client -N unexistent 127.0.0.1 /dev/nbd0
Negotiation: ..size = 2314498962MBError: Exported device is too big for me. Get 64-bit machine :-(

Exiting.