nbd/client: refactor nbd_read_eof

Refactor nbd_read_eof to return 1 on success, 0 on eof, when no
data was read and <0 for other cases, because returned size of
read data is not actually used.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20170804151440.320927-3-vsementsov@virtuozzo.com>
[eblake: tweak function comments, rebase to test 083 enhancements]
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2017-08-04 18:14:25 +03:00 committed by Eric Blake
parent a0acf3a8f7
commit ab01df1fe2
3 changed files with 28 additions and 18 deletions

View file

@ -69,12 +69,12 @@ read failed: Input/output error
=== Check disconnect 4 reply ===
read failed
End of file
read failed: Input/output error
=== Check disconnect 8 reply ===
read failed
End of file
read failed: Input/output error
=== Check disconnect before data ===
@ -180,12 +180,12 @@ read failed: Input/output error
=== Check disconnect 4 reply ===
read failed
End of file
read failed: Input/output error
=== Check disconnect 8 reply ===
read failed
End of file
read failed: Input/output error
=== Check disconnect before data ===